Lines Matching defs:value
49 public static boolean isValidType(Object value) {
50 return (value instanceof Integer) || (value instanceof Long) ||
51 (value instanceof Double) || (value instanceof String) ||
52 (value instanceof int[]) || (value instanceof long[]) ||
53 (value instanceof double[]) || (value instanceof String[]) ||
54 (value instanceof PersistableBundle) || (value == null) ||
55 (value instanceof Boolean) || (value instanceof boolean[]);
100 Object value = mMap.valueAt(i);
101 if (value instanceof ArrayMap) {
103 mMap.setValueAt(i, new PersistableBundle((ArrayMap<String, Object>) value));
104 } else if (!isValidType(value)) {
105 throw new IllegalArgumentException("Bad value in PersistableBundle key="
106 + mMap.keyAt(i) + " value=" + value);
116 * Make a PersistableBundle for a single key/value pair.
120 public static PersistableBundle forPair(String key, String value) {
122 b.putString(key, value);
136 * Inserts a PersistableBundle value into the mapping of this Bundle, replacing
137 * any existing value for the given key. Either key or value may be null.
140 * @param value a Bundle object, or null
142 public void putPersistableBundle(@Nullable String key, @Nullable PersistableBundle value) {
144 mMap.put(key, value);
148 * Returns the value associated with the given key, or null if
150 * value is explicitly associated with the key.
153 * @return a Bundle value, or null