Lines Matching refs:value
48 public static boolean isValidType(Object value) {
49 return (value instanceof Integer) || (value instanceof Long) ||
50 (value instanceof Double) || (value instanceof String) ||
51 (value instanceof int[]) || (value instanceof long[]) ||
52 (value instanceof double[]) || (value instanceof String[]) ||
53 (value instanceof PersistableBundle) || (value == null) ||
54 (value instanceof Boolean) || (value instanceof boolean[]);
117 Object value = mMap.valueAt(i);
118 if (value instanceof ArrayMap) {
120 mMap.setValueAt(i, new PersistableBundle((ArrayMap<String, Object>) value));
121 } else if (value instanceof Bundle) {
122 mMap.setValueAt(i, new PersistableBundle(((Bundle) value)));
123 } else if (!isValidType(value)) {
124 throw new IllegalArgumentException("Bad value in PersistableBundle key="
125 + mMap.keyAt(i) + " value=" + value);
136 * Make a PersistableBundle for a single key/value pair.
140 public static PersistableBundle forPair(String key, String value) {
142 b.putString(key, value);
156 * Inserts a PersistableBundle value into the mapping of this Bundle, replacing
157 * any existing value for the given key. Either key or value may be null.
160 * @param value a Bundle object, or null
162 public void putPersistableBundle(@Nullable String key, @Nullable PersistableBundle value) {
164 mMap.put(key, value);
168 * Returns the value associated with the given key, or null if
170 * value is explicitly associated with the key.
173 * @return a Bundle value, or null