Lines Matching refs:key

262      * Returns true if the given key is contained in the mapping
265 * @param key a String key
266 * @return true if the key is part of the mapping, false otherwise
268 public boolean containsKey(String key) {
270 return mMap.containsKey(key);
274 * Returns the entry with the given key as an object.
276 * @param key a String key
279 public Object get(String key) {
281 return mMap.get(key);
285 * Removes any entry with the given key from the mapping of this Bundle.
287 * @param key a String key
289 public void remove(String key) {
291 mMap.remove(key);
327 * any existing value for the given key. Either key or value may be null.
329 * @param key a String, or null
332 public void putBoolean(String key, boolean value) {
334 mMap.put(key, value);
339 * any existing value for the given key.
341 * @param key a String, or null
344 void putByte(String key, byte value) {
346 mMap.put(key, value);
351 * any existing value for the given key.
353 * @param key a String, or null
356 void putChar(String key, char value) {
358 mMap.put(key, value);
363 * any existing value for the given key.
365 * @param key a String, or null
368 void putShort(String key, short value) {
370 mMap.put(key, value);
375 * any existing value for the given key.
377 * @param key a String, or null
380 public void putInt(String key, int value) {
382 mMap.put(key, value);
387 * any existing value for the given key.
389 * @param key a String, or null
392 public void putLong(String key, long value) {
394 mMap.put(key, value);
399 * any existing value for the given key.
401 * @param key a String, or null
404 void putFloat(String key, float value) {
406 mMap.put(key, value);
411 * any existing value for the given key.
413 * @param key a String, or null
416 public void putDouble(String key, double value) {
418 mMap.put(key, value);
423 * any existing value for the given key. Either key or value may be null.
425 * @param key a String, or null
428 public void putString(String key, String value) {
430 mMap.put(key, value);
435 * any existing value for the given key. Either key or value may be null.
437 * @param key a String, or null
440 void putCharSequence(String key, CharSequence value) {
442 mMap.put(key, value);
447 * any existing value for the given key. Either key or value may be null.
449 * @param key a String, or null
452 void putIntegerArrayList(String key, ArrayList<Integer> value) {
454 mMap.put(key, value);
459 * any existing value for the given key. Either key or value may be null.
461 * @param key a String, or null
464 void putStringArrayList(String key, ArrayList<String> value) {
466 mMap.put(key, value);
471 * any existing value for the given key. Either key or value may be null.
473 * @param key a String, or null
476 void putCharSequenceArrayList(String key, ArrayList<CharSequence> value) {
478 mMap.put(key, value);
483 * any existing value for the given key. Either key or value may be null.
485 * @param key a String, or null
488 void putSerializable(String key, Serializable value) {
490 mMap.put(key, value);
495 * any existing value for the given key. Either key or value may be null.
497 * @param key a String, or null
500 public void putBooleanArray(String key, boolean[] value) {
502 mMap.put(key, value);
507 * any existing value for the given key. Either key or value may be null.
509 * @param key a String, or null
512 void putByteArray(String key, byte[] value) {
514 mMap.put(key, value);
519 * any existing value for the given key. Either key or value may be null.
521 * @param key a String, or null
524 void putShortArray(String key, short[] value) {
526 mMap.put(key, value);
531 * any existing value for the given key. Either key or value may be null.
533 * @param key a String, or null
536 void putCharArray(String key, char[] value) {
538 mMap.put(key, value);
543 * any existing value for the given key. Either key or value may be null.
545 * @param key a String, or null
548 public void putIntArray(String key, int[] value) {
550 mMap.put(key, value);
555 * any existing value for the given key. Either key or value may be null.
557 * @param key a String, or null
560 public void putLongArray(String key, long[] value) {
562 mMap.put(key, value);
567 * any existing value for the given key. Either key or value may be null.
569 * @param key a String, or null
572 void putFloatArray(String key, float[] value) {
574 mMap.put(key, value);
579 * any existing value for the given key. Either key or value may be null.
581 * @param key a String, or null
584 public void putDoubleArray(String key, double[] value) {
586 mMap.put(key, value);
591 * any existing value for the given key. Either key or value may be null.
593 * @param key a String, or null
596 public void putStringArray(String key, String[] value) {
598 mMap.put(key, value);
603 * any existing value for the given key. Either key or value may be null.
605 * @param key a String, or null
608 void putCharSequenceArray(String key, CharSequence[] value) {
610 mMap.put(key, value);
614 * Returns the value associated with the given key, or false if
615 * no mapping of the desired type exists for the given key.
617 * @param key a String
620 public boolean getBoolean(String key) {
624 return getBoolean(key, false);
628 void typeWarning(String key, Object value, String className,
632 sb.append(key);
644 void typeWarning(String key, Object value, String className,
646 typeWarning(key, value, className, "<null>", e);
650 * Returns the value associated with the given key, or defaultValue if
651 * no mapping of the desired type exists for the given key.
653 * @param key a String
654 * @param defaultValue Value to return if key does not exist
657 public boolean getBoolean(String key, boolean defaultValue) {
659 Object o = mMap.get(key);
666 typeWarning(key, o, "Boolean", defaultValue, e);
672 * Returns the value associated with the given key, or (byte) 0 if
673 * no mapping of the desired type exists for the given key.
675 * @param key a String
678 byte getByte(String key) {
680 return getByte(key, (byte) 0);
684 * Returns the value associated with the given key, or defaultValue if
685 * no mapping of the desired type exists for the given key.
687 * @param key a String
688 * @param defaultValue Value to return if key does not exist
691 Byte getByte(String key, byte defaultValue) {
693 Object o = mMap.get(key);
700 typeWarning(key, o, "Byte", defaultValue, e);
706 * Returns the value associated with the given key, or (char) 0 if
707 * no mapping of the desired type exists for the given key.
709 * @param key a String
712 char getChar(String key) {
714 return getChar(key, (char) 0);
718 * Returns the value associated with the given key, or defaultValue if
719 * no mapping of the desired type exists for the given key.
721 * @param key a String
722 * @param defaultValue Value to return if key does not exist
725 char getChar(String key, char defaultValue) {
727 Object o = mMap.get(key);
734 typeWarning(key, o, "Character", defaultValue, e);
740 * Returns the value associated with the given key, or (short) 0 if
741 * no mapping of the desired type exists for the given key.
743 * @param key a String
746 short getShort(String key) {
748 return getShort(key, (short) 0);
752 * Returns the value associated with the given key, or defaultValue if
753 * no mapping of the desired type exists for the given key.
755 * @param key a String
756 * @param defaultValue Value to return if key does not exist
759 short getShort(String key, short defaultValue) {
761 Object o = mMap.get(key);
768 typeWarning(key, o, "Short", defaultValue, e);
774 * Returns the value associated with the given key, or 0 if
775 * no mapping of the desired type exists for the given key.
777 * @param key a String
780 public int getInt(String key) {
782 return getInt(key, 0);
786 * Returns the value associated with the given key, or defaultValue if
787 * no mapping of the desired type exists for the given key.
789 * @param key a String
790 * @param defaultValue Value to return if key does not exist
793 public int getInt(String key, int defaultValue) {
795 Object o = mMap.get(key);
802 typeWarning(key, o, "Integer", defaultValue, e);
808 * Returns the value associated with the given key, or 0L if
809 * no mapping of the desired type exists for the given key.
811 * @param key a String
814 public long getLong(String key) {
816 return getLong(key, 0L);
820 * Returns the value associated with the given key, or defaultValue if
821 * no mapping of the desired type exists for the given key.
823 * @param key a String
824 * @param defaultValue Value to return if key does not exist
827 public long getLong(String key, long defaultValue) {
829 Object o = mMap.get(key);
836 typeWarning(key, o, "Long", defaultValue, e);
842 * Returns the value associated with the given key, or 0.0f if
843 * no mapping of the desired type exists for the given key.
845 * @param key a String
848 float getFloat(String key) {
850 return getFloat(key, 0.0f);
854 * Returns the value associated with the given key, or defaultValue if
855 * no mapping of the desired type exists for the given key.
857 * @param key a String
858 * @param defaultValue Value to return if key does not exist
861 float getFloat(String key, float defaultValue) {
863 Object o = mMap.get(key);
870 typeWarning(key, o, "Float", defaultValue, e);
876 * Returns the value associated with the given key, or 0.0 if
877 * no mapping of the desired type exists for the given key.
879 * @param key a String
882 public double getDouble(String key) {
884 return getDouble(key, 0.0);
888 * Returns the value associated with the given key, or defaultValue if
889 * no mapping of the desired type exists for the given key.
891 * @param key a String
892 * @param defaultValue Value to return if key does not exist
895 public double getDouble(String key, double defaultValue) {
897 Object o = mMap.get(key);
904 typeWarning(key, o, "Double", defaultValue, e);
910 * Returns the value associated with the given key, or null if
911 * no mapping of the desired type exists for the given key or a null
912 * value is explicitly associated with the key.
914 * @param key a String, or null
917 public String getString(String key) {
919 final Object o = mMap.get(key);
923 typeWarning(key, o, "String", e);
929 * Returns the value associated with the given key, or defaultValue if
930 * no mapping of the desired type exists for the given key or if a null
931 * value is explicitly associated with the given key.
933 * @param key a String, or null
934 * @param defaultValue Value to return if key does not exist or if a null
935 * value is associated with the given key.
936 * @return the String value associated with the given key, or defaultValue
937 * if no valid String object is currently mapped to that key.
939 public String getString(String key, String defaultValue) {
940 final String s = getString(key);
945 * Returns the value associated with the given key, or null if
946 * no mapping of the desired type exists for the given key or a null
947 * value is explicitly associated with the key.
949 * @param key a String, or null
952 CharSequence getCharSequence(String key) {
954 final Object o = mMap.get(key);
958 typeWarning(key, o, "CharSequence", e);
964 * Returns the value associated with the given key, or defaultValue if
965 * no mapping of the desired type exists for the given key or if a null
966 * value is explicitly associated with the given key.
968 * @param key a String, or null
969 * @param defaultValue Value to return if key does not exist or if a null
970 * value is associated with the given key.
971 * @return the CharSequence value associated with the given key, or defaultValue
972 * if no valid CharSequence object is currently mapped to that key.
974 CharSequence getCharSequence(String key, CharSequence defaultValue) {
975 final CharSequence cs = getCharSequence(key);
980 * Returns the value associated with the given key, or null if
981 * no mapping of the desired type exists for the given key or a null
982 * value is explicitly associated with the key.
984 * @param key a String, or null
987 Serializable getSerializable(String key) {
989 Object o = mMap.get(key);
996 typeWarning(key, o, "Serializable", e);
1002 * Returns the value associated with the given key, or null if
1003 * no mapping of the desired type exists for the given key or a null
1004 * value is explicitly associated with the key.
1006 * @param key a String, or null
1009 ArrayList<Integer> getIntegerArrayList(String key) {
1011 Object o = mMap.get(key);
1018 typeWarning(key, o, "ArrayList<Integer>", e);
1024 * Returns the value associated with the given key, or null if
1025 * no mapping of the desired type exists for the given key or a null
1026 * value is explicitly associated with the key.
1028 * @param key a String, or null
1031 ArrayList<String> getStringArrayList(String key) {
1033 Object o = mMap.get(key);
1040 typeWarning(key, o, "ArrayList<String>", e);
1046 * Returns the value associated with the given key, or null if
1047 * no mapping of the desired type exists for the given key or a null
1048 * value is explicitly associated with the key.
1050 * @param key a String, or null
1053 ArrayList<CharSequence> getCharSequenceArrayList(String key) {
1055 Object o = mMap.get(key);
1062 typeWarning(key, o, "ArrayList<CharSequence>", e);
1068 * Returns the value associated with the given key, or null if
1069 * no mapping of the desired type exists for the given key or a null
1070 * value is explicitly associated with the key.
1072 * @param key a String, or null
1075 public boolean[] getBooleanArray(String key) {
1077 Object o = mMap.get(key);
1084 typeWarning(key, o, "byte[]", e);
1090 * Returns the value associated with the given key, or null if
1091 * no mapping of the desired type exists for the given key or a null
1092 * value is explicitly associated with the key.
1094 * @param key a String, or null
1097 byte[] getByteArray(String key) {
1099 Object o = mMap.get(key);
1106 typeWarning(key, o, "byte[]", e);
1112 * Returns the value associated with the given key, or null if
1113 * no mapping of the desired type exists for the given key or a null
1114 * value is explicitly associated with the key.
1116 * @param key a String, or null
1119 short[] getShortArray(String key) {
1121 Object o = mMap.get(key);
1128 typeWarning(key, o, "short[]", e);
1134 * Returns the value associated with the given key, or null if
1135 * no mapping of the desired type exists for the given key or a null
1136 * value is explicitly associated with the key.
1138 * @param key a String, or null
1141 char[] getCharArray(String key) {
1143 Object o = mMap.get(key);
1150 typeWarning(key, o, "char[]", e);
1156 * Returns the value associated with the given key, or null if
1157 * no mapping of the desired type exists for the given key or a null
1158 * value is explicitly associated with the key.
1160 * @param key a String, or null
1163 public int[] getIntArray(String key) {
1165 Object o = mMap.get(key);
1172 typeWarning(key, o, "int[]", e);
1178 * Returns the value associated with the given key, or null if
1179 * no mapping of the desired type exists for the given key or a null
1180 * value is explicitly associated with the key.
1182 * @param key a String, or null
1185 public long[] getLongArray(String key) {
1187 Object o = mMap.get(key);
1194 typeWarning(key, o, "long[]", e);
1200 * Returns the value associated with the given key, or null if
1201 * no mapping of the desired type exists for the given key or a null
1202 * value is explicitly associated with the key.
1204 * @param key a String, or null
1207 float[] getFloatArray(String key) {
1209 Object o = mMap.get(key);
1216 typeWarning(key, o, "float[]", e);
1222 * Returns the value associated with the given key, or null if
1223 * no mapping of the desired type exists for the given key or a null
1224 * value is explicitly associated with the key.
1226 * @param key a String, or null
1229 public double[] getDoubleArray(String key) {
1231 Object o = mMap.get(key);
1238 typeWarning(key, o, "double[]", e);
1244 * Returns the value associated with the given key, or null if
1245 * no mapping of the desired type exists for the given key or a null
1246 * value is explicitly associated with the key.
1248 * @param key a String, or null
1251 public String[] getStringArray(String key) {
1253 Object o = mMap.get(key);
1260 typeWarning(key, o, "String[]", e);
1266 * Returns the value associated with the given key, or null if
1267 * no mapping of the desired type exists for the given key or a null
1268 * value is explicitly associated with the key.
1270 * @param key a String, or null
1273 CharSequence[] getCharSequenceArray(String key) {
1275 Object o = mMap.get(key);
1282 typeWarning(key, o, "CharSequence[]", e);