/** * Returns a set of the keys contained in this object. * @return A set of the keys. */ public Set<String> keySet() { return this.bundle.keySet(); }
/** * The set of keys that have been set in this instance of CameraEffectArguments * @return The set of keys that have been set in this instance of CameraEffectArguments */ public Set<String> keySet() { return this.params.keySet(); }
public Set<String> keySet() { return this.textures.keySet(); }
public static String bundle2string(Bundle bundle) { if (bundle == null) { return null; } String string = "Bundle{"; for (String key : bundle.keySet()) { string += " " + key + " => " + bundle.get(key) + ";"; } string += " }Bundle"; return string; }
public class IncomingCallTracker extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle bundle = intent.getExtras(); Set<String> keys = bundle.keySet(); for (String key : keys) { Log.i("MYAPP##", key + "="+ bundle.getString(key)); } } }
import java.util.Iterator; import java.util.Set; import android.os.Bundle; public static void dumpIntent(Intent i){ Bundle bundle = i.getExtras(); if (bundle != null) { Set<String> keys = bundle.keySet(); Iterator<String> it = keys.iterator(); Log.e(LOG_TAG,"Dumping Intent start"); while (it.hasNext()) { String key = it.next(); Log.e(LOG_TAG,"[" + key + "=" + bundle.get(key)+"]"); } Log.e(LOG_TAG,"Dumping Intent end"); } }
public static void writeMeta(Parcel p, Bundle meta) { Map<String, String> map = new HashMap<>(); if (meta != null) { for (String key : meta.keySet()) { map.put(key, meta.getString(key)); } } p.writeMap(map); }
@Override protected String toDebugString(long now) { if (loginOptions != null) loginOptions.keySet(); return super.toDebugString(now) + ", updateCredentials" + ", " + account + ", authTokenType " + authTokenType + ", loginOptions " + loginOptions; }
private void dumpBundleToLog(String msg, Bundle b) { Log.d(getClass().getSimpleName(), String.format("Task ID #%d", getTaskId())); for (String key: b.keySet()) { Log.d(getClass().getSimpleName(), String.format("(%s) %s: %s", msg, key, b.get(key))); } } }
JSONObject dumpBundle(Bundle b, JSONObject json) throws JSONException { Set<String> keys=b.keySet(); for (String key : keys) { json.put(key, wrap(b.get(key))); } return (json); }
protected JSONObject dumpBundle(Bundle b, JSONObject json) throws JSONException { Set<String> keys=b.keySet(); for (String key : keys) { json.put(key, wrap(b.get(key))); } return(json); }
private static boolean isGzipCompressible(GraphRequestBatch requests) { for (GraphRequest request : requests) { for (String key : request.parameters.keySet()) { Object value = request.parameters.get(key); if (isSupportedAttachmentType(value)) { return false; } } } return true; }
@Implementation protected static void validateSyncExtrasBundle(Bundle extras) { for (String key : extras.keySet()) { Object value = extras.get(key); if (value == null || value instanceof Long || value instanceof Integer || value instanceof Boolean || value instanceof Float || value instanceof Double || value instanceof String || value instanceof Account) { continue; } throw new IllegalArgumentException("unexpected value type: " + value.getClass().getName()); } }
public List<ConfigModule> parse() { List<ConfigModule> modules = new ArrayList<ConfigModule>(); try { ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo( context.getPackageName(), PackageManager.GET_META_DATA); if (appInfo.metaData != null) { for (String key : appInfo.metaData.keySet()) { if (MODULE_VALUE.equals(appInfo.metaData.get(key))) { modules.add(parseModule(key)); } } } } catch (PackageManager.NameNotFoundException e) { throw new RuntimeException("Unable to find metadata to parse ConfigModule", e); } return modules; }
Log.v(TAG, "Got app info metadata: " + appInfo.metaData); for (String key : appInfo.metaData.keySet()) { if (GLIDE_MODULE_VALUE.equals(appInfo.metaData.get(key))) { modules.add(parseModule(key));
private static boolean isBundleEqual(Bundle bundle1, Bundle bundle2) { if (bundle1 == null || bundle2 == null) { return false; } if (bundle1.size() != bundle2.size()) { return false; } for (String key : bundle1.keySet()) { if (!bundle1.get(key).equals(bundle2.get(key))) { return false; } } return true; }
RestrictionsAdapter(Bundle restrictions) { super(getActivity(), android.R.layout.simple_list_item_1, new ArrayList<String>()); ArrayList<String> keys= new ArrayList<String>(restrictions.keySet()); Collections.sort(keys); addAll(keys); this.restrictions=restrictions; }
RestrictionsAdapter(Bundle restrictions) { super(getActivity(), android.R.layout.simple_list_item_1, new ArrayList<String>()); ArrayList<String> keys= new ArrayList<String>(restrictions.keySet()); Collections.sort(keys); addAll(keys); this.restrictions=restrictions; }
private static void serializeParameters( Bundle bundle, Serializer serializer, GraphRequest request ) throws IOException { Set<String> keys = bundle.keySet(); for (String key : keys) { Object value = bundle.get(key); if (isSupportedParameterType(value)) { serializer.writeObject(key, value, request); } } }
public static void assertEqualContents(final Bundle a, final Bundle b) { for (String key : a.keySet()) { if (!b.containsKey(key)) { Assert.fail("bundle does not include key " + key); } Assert.assertEquals(a.get(key), b.get(key)); } for (String key : b.keySet()) { if (!a.containsKey(key)) { Assert.fail("bundle does not include key " + key); } } }