Lines Matching defs:key

428      * Returns true if the given key is contained in the mapping
431 * @param key a String key
432 * @return true if the key is part of the mapping, false otherwise
434 public boolean containsKey(String key) {
436 return mMap.containsKey(key);
440 * Returns the entry with the given key as an object.
442 * @param key a String key
446 public Object get(String key) {
448 return mMap.get(key);
452 * Removes any entry with the given key from the mapping of this Bundle.
454 * @param key a String key
456 public void remove(String key) {
458 mMap.remove(key);
494 * any existing value for the given key. Either key or value may be null.
496 * @param key a String, or null
499 public void putBoolean(@Nullable String key, boolean value) {
501 mMap.put(key, value);
506 * any existing value for the given key.
508 * @param key a String, or null
511 void putByte(@Nullable String key, byte value) {
513 mMap.put(key, value);
518 * any existing value for the given key.
520 * @param key a String, or null
523 void putChar(@Nullable String key, char value) {
525 mMap.put(key, value);
530 * any existing value for the given key.
532 * @param key a String, or null
535 void putShort(@Nullable String key, short value) {
537 mMap.put(key, value);
542 * any existing value for the given key.
544 * @param key a String, or null
547 public void putInt(@Nullable String key, int value) {
549 mMap.put(key, value);
554 * any existing value for the given key.
556 * @param key a String, or null
559 public void putLong(@Nullable String key, long value) {
561 mMap.put(key, value);
566 * any existing value for the given key.
568 * @param key a String, or null
571 void putFloat(@Nullable String key, float value) {
573 mMap.put(key, value);
578 * any existing value for the given key.
580 * @param key a String, or null
583 public void putDouble(@Nullable String key, double value) {
585 mMap.put(key, value);
590 * any existing value for the given key. Either key or value may be null.
592 * @param key a String, or null
595 public void putString(@Nullable String key, @Nullable String value) {
597 mMap.put(key, value);
602 * any existing value for the given key. Either key or value may be null.
604 * @param key a String, or null
607 void putCharSequence(@Nullable String key, @Nullable CharSequence value) {
609 mMap.put(key, value);
614 * any existing value for the given key. Either key or value may be null.
616 * @param key a String, or null
619 void putIntegerArrayList(@Nullable String key, @Nullable ArrayList<Integer> value) {
621 mMap.put(key, value);
626 * any existing value for the given key. Either key or value may be null.
628 * @param key a String, or null
631 void putStringArrayList(@Nullable String key, @Nullable ArrayList<String> value) {
633 mMap.put(key, value);
638 * any existing value for the given key. Either key or value may be null.
640 * @param key a String, or null
643 void putCharSequenceArrayList(@Nullable String key, @Nullable ArrayList<CharSequence> value) {
645 mMap.put(key, value);
650 * any existing value for the given key. Either key or value may be null.
652 * @param key a String, or null
655 void putSerializable(@Nullable String key, @Nullable Serializable value) {
657 mMap.put(key, value);
662 * any existing value for the given key. Either key or value may be null.
664 * @param key a String, or null
667 public void putBooleanArray(@Nullable String key, @Nullable boolean[] value) {
669 mMap.put(key, value);
674 * any existing value for the given key. Either key or value may be null.
676 * @param key a String, or null
679 void putByteArray(@Nullable String key, @Nullable byte[] value) {
681 mMap.put(key, value);
686 * any existing value for the given key. Either key or value may be null.
688 * @param key a String, or null
691 void putShortArray(@Nullable String key, @Nullable short[] value) {
693 mMap.put(key, value);
698 * any existing value for the given key. Either key or value may be null.
700 * @param key a String, or null
703 void putCharArray(@Nullable String key, @Nullable char[] value) {
705 mMap.put(key, value);
710 * any existing value for the given key. Either key or value may be null.
712 * @param key a String, or null
715 public void putIntArray(@Nullable String key, @Nullable int[] value) {
717 mMap.put(key, value);
722 * any existing value for the given key. Either key or value may be null.
724 * @param key a String, or null
727 public void putLongArray(@Nullable String key, @Nullable long[] value) {
729 mMap.put(key, value);
734 * any existing value for the given key. Either key or value may be null.
736 * @param key a String, or null
739 void putFloatArray(@Nullable String key, @Nullable float[] value) {
741 mMap.put(key, value);
746 * any existing value for the given key. Either key or value may be null.
748 * @param key a String, or null
751 public void putDoubleArray(@Nullable String key, @Nullable double[] value) {
753 mMap.put(key, value);
758 * any existing value for the given key. Either key or value may be null.
760 * @param key a String, or null
763 public void putStringArray(@Nullable String key, @Nullable String[] value) {
765 mMap.put(key, value);
770 * any existing value for the given key. Either key or value may be null.
772 * @param key a String, or null
775 void putCharSequenceArray(@Nullable String key, @Nullable CharSequence[] value) {
777 mMap.put(key, value);
781 * Returns the value associated with the given key, or false if
782 * no mapping of the desired type exists for the given key.
784 * @param key a String
787 public boolean getBoolean(String key) {
791 return getBoolean(key, false);
795 void typeWarning(String key, Object value, String className,
799 sb.append(key);
811 void typeWarning(String key, Object value, String className,
813 typeWarning(key, value, className, "<null>", e);
817 * Returns the value associated with the given key, or defaultValue if
818 * no mapping of the desired type exists for the given key.
820 * @param key a String
821 * @param defaultValue Value to return if key does not exist
824 public boolean getBoolean(String key, boolean defaultValue) {
826 Object o = mMap.get(key);
833 typeWarning(key, o, "Boolean", defaultValue, e);
839 * Returns the value associated with the given key, or (byte) 0 if
840 * no mapping of the desired type exists for the given key.
842 * @param key a String
845 byte getByte(String key) {
847 return getByte(key, (byte) 0);
851 * Returns the value associated with the given key, or defaultValue if
852 * no mapping of the desired type exists for the given key.
854 * @param key a String
855 * @param defaultValue Value to return if key does not exist
858 Byte getByte(String key, byte defaultValue) {
860 Object o = mMap.get(key);
867 typeWarning(key, o, "Byte", defaultValue, e);
873 * Returns the value associated with the given key, or (char) 0 if
874 * no mapping of the desired type exists for the given key.
876 * @param key a String
879 char getChar(String key) {
881 return getChar(key, (char) 0);
885 * Returns the value associated with the given key, or defaultValue if
886 * no mapping of the desired type exists for the given key.
888 * @param key a String
889 * @param defaultValue Value to return if key does not exist
892 char getChar(String key, char defaultValue) {
894 Object o = mMap.get(key);
901 typeWarning(key, o, "Character", defaultValue, e);
907 * Returns the value associated with the given key, or (short) 0 if
908 * no mapping of the desired type exists for the given key.
910 * @param key a String
913 short getShort(String key) {
915 return getShort(key, (short) 0);
919 * Returns the value associated with the given key, or defaultValue if
920 * no mapping of the desired type exists for the given key.
922 * @param key a String
923 * @param defaultValue Value to return if key does not exist
926 short getShort(String key, short defaultValue) {
928 Object o = mMap.get(key);
935 typeWarning(key, o, "Short", defaultValue, e);
941 * Returns the value associated with the given key, or 0 if
942 * no mapping of the desired type exists for the given key.
944 * @param key a String
947 public int getInt(String key) {
949 return getInt(key, 0);
953 * Returns the value associated with the given key, or defaultValue if
954 * no mapping of the desired type exists for the given key.
956 * @param key a String
957 * @param defaultValue Value to return if key does not exist
960 public int getInt(String key, int defaultValue) {
962 Object o = mMap.get(key);
969 typeWarning(key, o, "Integer", defaultValue, e);
975 * Returns the value associated with the given key, or 0L if
976 * no mapping of the desired type exists for the given key.
978 * @param key a String
981 public long getLong(String key) {
983 return getLong(key, 0L);
987 * Returns the value associated with the given key, or defaultValue if
988 * no mapping of the desired type exists for the given key.
990 * @param key a String
991 * @param defaultValue Value to return if key does not exist
994 public long getLong(String key, long defaultValue) {
996 Object o = mMap.get(key);
1003 typeWarning(key, o, "Long", defaultValue, e);
1009 * Returns the value associated with the given key, or 0.0f if
1010 * no mapping of the desired type exists for the given key.
1012 * @param key a String
1015 float getFloat(String key) {
1017 return getFloat(key, 0.0f);
1021 * Returns the value associated with the given key, or defaultValue if
1022 * no mapping of the desired type exists for the given key.
1024 * @param key a String
1025 * @param defaultValue Value to return if key does not exist
1028 float getFloat(String key, float defaultValue) {
1030 Object o = mMap.get(key);
1037 typeWarning(key, o, "Float", defaultValue, e);
1043 * Returns the value associated with the given key, or 0.0 if
1044 * no mapping of the desired type exists for the given key.
1046 * @param key a String
1049 public double getDouble(String key) {
1051 return getDouble(key, 0.0);
1055 * Returns the value associated with the given key, or defaultValue if
1056 * no mapping of the desired type exists for the given key.
1058 * @param key a String
1059 * @param defaultValue Value to return if key does not exist
1062 public double getDouble(String key, double defaultValue) {
1064 Object o = mMap.get(key);
1071 typeWarning(key, o, "Double", defaultValue, e);
1077 * Returns the value associated with the given key, or null if
1078 * no mapping of the desired type exists for the given key or a null
1079 * value is explicitly associated with the key.
1081 * @param key a String, or null
1085 public String getString(@Nullable String key) {
1087 final Object o = mMap.get(key);
1091 typeWarning(key, o, "String", e);
1097 * Returns the value associated with the given key, or defaultValue if
1098 * no mapping of the desired type exists for the given key or if a null
1099 * value is explicitly associated with the given key.
1101 * @param key a String, or null
1102 * @param defaultValue Value to return if key does not exist or if a null
1103 * value is associated with the given key.
1104 * @return the String value associated with the given key, or defaultValue
1105 * if no valid String object is currently mapped to that key.
1107 public String getString(@Nullable String key, String defaultValue) {
1108 final String s = getString(key);
1113 * Returns the value associated with the given key, or null if
1114 * no mapping of the desired type exists for the given key or a null
1115 * value is explicitly associated with the key.
1117 * @param key a String, or null
1121 CharSequence getCharSequence(@Nullable String key) {
1123 final Object o = mMap.get(key);
1127 typeWarning(key, o, "CharSequence", e);
1133 * Returns the value associated with the given key, or defaultValue if
1134 * no mapping of the desired type exists for the given key or if a null
1135 * value is explicitly associated with the given key.
1137 * @param key a String, or null
1138 * @param defaultValue Value to return if key does not exist or if a null
1139 * value is associated with the given key.
1140 * @return the CharSequence value associated with the given key, or defaultValue
1141 * if no valid CharSequence object is currently mapped to that key.
1143 CharSequence getCharSequence(@Nullable String key, CharSequence defaultValue) {
1144 final CharSequence cs = getCharSequence(key);
1149 * Returns the value associated with the given key, or null if
1150 * no mapping of the desired type exists for the given key or a null
1151 * value is explicitly associated with the key.
1153 * @param key a String, or null
1157 Serializable getSerializable(@Nullable String key) {
1159 Object o = mMap.get(key);
1166 typeWarning(key, o, "Serializable", e);
1172 * Returns the value associated with the given key, or null if
1173 * no mapping of the desired type exists for the given key or a null
1174 * value is explicitly associated with the key.
1176 * @param key a String, or null
1180 ArrayList<Integer> getIntegerArrayList(@Nullable String key) {
1182 Object o = mMap.get(key);
1189 typeWarning(key, o, "ArrayList<Integer>", e);
1195 * Returns the value associated with the given key, or null if
1196 * no mapping of the desired type exists for the given key or a null
1197 * value is explicitly associated with the key.
1199 * @param key a String, or null
1203 ArrayList<String> getStringArrayList(@Nullable String key) {
1205 Object o = mMap.get(key);
1212 typeWarning(key, o, "ArrayList<String>", e);
1218 * Returns the value associated with the given key, or null if
1219 * no mapping of the desired type exists for the given key or a null
1220 * value is explicitly associated with the key.
1222 * @param key a String, or null
1226 ArrayList<CharSequence> getCharSequenceArrayList(@Nullable String key) {
1228 Object o = mMap.get(key);
1235 typeWarning(key, o, "ArrayList<CharSequence>", e);
1241 * Returns the value associated with the given key, or null if
1242 * no mapping of the desired type exists for the given key or a null
1243 * value is explicitly associated with the key.
1245 * @param key a String, or null
1249 public boolean[] getBooleanArray(@Nullable String key) {
1251 Object o = mMap.get(key);
1258 typeWarning(key, o, "byte[]", e);
1264 * Returns the value associated with the given key, or null if
1265 * no mapping of the desired type exists for the given key or a null
1266 * value is explicitly associated with the key.
1268 * @param key a String, or null
1272 byte[] getByteArray(@Nullable String key) {
1274 Object o = mMap.get(key);
1281 typeWarning(key, o, "byte[]", e);
1287 * Returns the value associated with the given key, or null if
1288 * no mapping of the desired type exists for the given key or a null
1289 * value is explicitly associated with the key.
1291 * @param key a String, or null
1295 short[] getShortArray(@Nullable String key) {
1297 Object o = mMap.get(key);
1304 typeWarning(key, o, "short[]", e);
1310 * Returns the value associated with the given key, or null if
1311 * no mapping of the desired type exists for the given key or a null
1312 * value is explicitly associated with the key.
1314 * @param key a String, or null
1318 char[] getCharArray(@Nullable String key) {
1320 Object o = mMap.get(key);
1327 typeWarning(key, o, "char[]", e);
1333 * Returns the value associated with the given key, or null if
1334 * no mapping of the desired type exists for the given key or a null
1335 * value is explicitly associated with the key.
1337 * @param key a String, or null
1341 public int[] getIntArray(@Nullable String key) {
1343 Object o = mMap.get(key);
1350 typeWarning(key, o, "int[]", e);
1356 * Returns the value associated with the given key, or null if
1357 * no mapping of the desired type exists for the given key or a null
1358 * value is explicitly associated with the key.
1360 * @param key a String, or null
1364 public long[] getLongArray(@Nullable String key) {
1366 Object o = mMap.get(key);
1373 typeWarning(key, o, "long[]", e);
1379 * Returns the value associated with the given key, or null if
1380 * no mapping of the desired type exists for the given key or a null
1381 * value is explicitly associated with the key.
1383 * @param key a String, or null
1387 float[] getFloatArray(@Nullable String key) {
1389 Object o = mMap.get(key);
1396 typeWarning(key, o, "float[]", e);
1402 * Returns the value associated with the given key, or null if
1403 * no mapping of the desired type exists for the given key or a null
1404 * value is explicitly associated with the key.
1406 * @param key a String, or null
1410 public double[] getDoubleArray(@Nullable String key) {
1412 Object o = mMap.get(key);
1419 typeWarning(key, o, "double[]", e);
1425 * Returns the value associated with the given key, or null if
1426 * no mapping of the desired type exists for the given key or a null
1427 * value is explicitly associated with the key.
1429 * @param key a String, or null
1433 public String[] getStringArray(@Nullable String key) {
1435 Object o = mMap.get(key);
1442 typeWarning(key, o, "String[]", e);
1448 * Returns the value associated with the given key, or null if
1449 * no mapping of the desired type exists for the given key or a null
1450 * value is explicitly associated with the key.
1452 * @param key a String, or null
1456 CharSequence[] getCharSequenceArray(@Nullable String key) {
1458 Object o = mMap.get(key);
1465 typeWarning(key, o, "CharSequence[]", e);