/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/ |
H A D | AnnotationsTest.java | 57 assertEquals((byte) 5, defaultValue("a")); 58 assertEquals((short) 6, defaultValue("b")); 59 assertEquals(7, defaultValue("c")); 60 assertEquals(8L, defaultValue("d")); 61 assertEquals(9.0f, defaultValue("e")); 62 assertEquals(10.0, defaultValue("f")); 63 assertEquals('k', defaultValue("g")); 64 assertEquals(true, defaultValue("h")); 65 assertEquals(Breakfast.WAFFLES, defaultValue("i")); 66 assertEquals("@" + AnnotationA.class.getName() + "()", defaultValue(" 75 private static Object defaultValue(String name) throws NoSuchMethodException { method in class:AnnotationsTest [all...] |
/libcore/json/src/test/java/libcore/org/json/ |
H A D | SelfUseTest.java | 60 @Override public boolean optBoolean(String key, boolean defaultValue) { 62 return super.optBoolean(key, defaultValue); 64 @Override public double optDouble(String key, double defaultValue) { 66 return super.optDouble(key, defaultValue); 68 @Override public int optInt(String key, int defaultValue) { 70 return super.optInt(key, defaultValue); 72 @Override public long optLong(String key, long defaultValue) { 74 return super.optLong(key, defaultValue); 76 @Override public String optString(String key, String defaultValue) { 78 return super.optString(key, defaultValue); [all...] |
/libcore/luni/src/test/java/libcore/java/util/ |
H A D | MapDefaultMethodTester.java | 100 V expected, Map<K, V> map, K key, V defaultValue) { 101 V actual = map.getOrDefault(key, defaultValue); 104 assertSame(expected, getOrDefault_hashMap(map, key, defaultValue)); 105 assertSame(expected, getOrDefault_optimizeForPresent(map, key, defaultValue)); 106 assertSame(expected, getOrDefault_optimizeForAbsent(map, key, defaultValue)); 110 private static<K, V> V getOrDefault_hashMap(Map<K, V> map, K key, V defaultValue) { argument 111 return new HashMap<>(map).getOrDefault(key, defaultValue); 118 private static<K, V> V getOrDefault_optimizeForAbsent(Map<K, V> map, K key, V defaultValue) { argument 119 return map.containsKey(key) ? map.get(key) : defaultValue; 126 private static<K, V> V getOrDefault_optimizeForPresent(Map<K, V> map, K key, V defaultValue) { argument 99 checkGetOrDefault( V expected, Map<K, V> map, K key, V defaultValue) argument [all...] |
/libcore/ojluni/src/main/java/java/util/logging/ |
H A D | LogManager.java | 1474 String getStringProperty(String name, String defaultValue) { argument 1477 return defaultValue; 1485 int getIntProperty(String name, int defaultValue) { argument 1488 return defaultValue; 1493 return defaultValue; 1500 boolean getBooleanProperty(String name, boolean defaultValue) { argument 1503 return defaultValue; 1511 return defaultValue; 1517 Level getLevelProperty(String name, Level defaultValue) { argument 1520 return defaultValue; 1530 getFilterProperty(String name, Filter defaultValue) argument 1550 getFormatterProperty(String name, Formatter defaultValue) argument [all...] |
/libcore/ojluni/src/main/java/java/util/concurrent/ |
H A D | ConcurrentMap.java | 88 default V getOrDefault(Object key, V defaultValue) { argument 90 return ((v = get(key)) != null) ? v : defaultValue;
|
H A D | ConcurrentSkipListMap.java | 1546 * or the given defaultValue if this map contains no mapping for the key. 1549 * @param defaultValue the value to return if this map contains 1551 * @return the mapping for the key, if present; else the defaultValue 1555 public V getOrDefault(Object key, V defaultValue) { argument 1557 return (v = doGet(key)) == null ? defaultValue : v;
|
H A D | ConcurrentHashMap.java | 1597 * @param defaultValue the value to return if this map contains 1602 public V getOrDefault(Object key, V defaultValue) { argument 1604 return (v = get(key)) == null ? defaultValue : v;
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Map.java | 566 * {@code defaultValue} if this map contains no mapping for the key. 575 * @param defaultValue the default mapping of the key 577 * {@code defaultValue} if this map contains no mapping for the key 586 default V getOrDefault(Object key, V defaultValue) { argument 590 : defaultValue;
|
H A D | Properties.java | 993 * @param defaultValue a default value. 999 public String getProperty(String key, String defaultValue) { argument 1001 return (val == null) ? defaultValue : val;
|
H A D | LinkedHashMap.java | 474 public V getOrDefault(Object key, V defaultValue) { argument 477 return defaultValue;
|
H A D | Collections.java | 1540 public V getOrDefault(Object k, V defaultValue) { argument 1542 return ((Map<K, V>)m).getOrDefault(k, defaultValue); 2686 public V getOrDefault(Object k, V defaultValue) { argument 2687 synchronized (mutex) {return m.getOrDefault(k, defaultValue);} 4640 public V getOrDefault(Object k, V defaultValue) { argument 4641 return defaultValue; 4952 public V getOrDefault(Object key, V defaultValue) { argument 4953 return eq(key, k) ? v : defaultValue;
|
H A D | Hashtable.java | 865 public synchronized V getOrDefault(Object key, V defaultValue) { argument 867 return (null == result) ? defaultValue : result;
|
H A D | HashMap.java | 1057 public V getOrDefault(Object key, V defaultValue) { argument 1059 return (e = getNode(hash(key), key)) == null ? defaultValue : e.value;
|
/libcore/luni/src/main/java/libcore/util/ |
H A D | TimeZoneFinder.java | 370 parser, EVER_USES_UTC_ATTRIBUTE, null /* defaultValue */); 402 parser, ZONE_SHOW_IN_PICKER_ATTRIBUTE, true /* defaultValue */); 404 parser, ZONE_NOT_USED_AFTER_ATTRIBUTE, null /* defaultValue */); 427 * If the attribute value is {@code null} then {@code defaultValue} is returned. If the 431 Long defaultValue) throws XmlPullParserException { 434 return defaultValue; 446 * If the attribute value is {@code null} then {@code defaultValue} is returned. If the 450 String attributeName, Boolean defaultValue) throws XmlPullParserException { 453 return defaultValue; 430 parseLongAttribute(XmlPullParser parser, String attributeName, Long defaultValue) argument 449 parseBooleanAttribute(XmlPullParser parser, String attributeName, Boolean defaultValue) argument
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | JSR166TestCase.java | 177 private static float systemPropertyValue(String name, float defaultValue) { argument 180 return defaultValue;
|
/libcore/ojluni/src/main/java/java/security/ |
H A D | Provider.java | 625 public synchronized Object getOrDefault(Object key, Object defaultValue) { argument 627 return super.getOrDefault(key, defaultValue);
|
/libcore/ojluni/src/main/java/java/lang/ |
H A D | Class.java | 2380 private native int getInnerClassFlags(int defaultValue); argument
|
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | R.java | 1513 public static final int defaultValue = 0; field in class:R
|