Searched defs:defaultValue (Results 1 - 16 of 16) sorted by relevance

/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/
H A DAnnotationsTest.java57 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/ojluni/src/main/java/java/util/concurrent/
H A DConcurrentMap.java88 default V getOrDefault(Object key, V defaultValue) { argument
90 return ((v = get(key)) != null) ? v : defaultValue;
H A DConcurrentSkipListMap.java1546 * 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 DConcurrentHashMap.java1597 * @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/luni/src/test/java/libcore/java/util/
H A DMapDefaultMethodTester.java100 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/
H A DMap.java566 * {@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 DProperties.java993 * @param defaultValue a default value.
999 public String getProperty(String key, String defaultValue) { argument
1001 return (val == null) ? defaultValue : val;
H A DLinkedHashMap.java474 public V getOrDefault(Object key, V defaultValue) { argument
477 return defaultValue;
H A DHashtable.java865 public synchronized V getOrDefault(Object key, V defaultValue) { argument
867 return (null == result) ? defaultValue : result;
H A DHashMap.java1057 public V getOrDefault(Object key, V defaultValue) { argument
1059 return (e = getNode(hash(key), key)) == null ? defaultValue : e.value;
H A DCollections.java1540 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);}
4638 public V getOrDefault(Object k, V defaultValue) { argument
4639 return defaultValue;
4950 public V getOrDefault(Object key, V defaultValue) { argument
4951 return eq(key, k) ? v : defaultValue;
/libcore/ojluni/src/main/java/java/lang/
H A DClass.java2373 private native int getInnerClassFlags(int defaultValue); argument
/libcore/ojluni/src/main/java/java/security/
H A DProvider.java621 public synchronized Object getOrDefault(Object key, Object defaultValue) { argument
623 return super.getOrDefault(key, defaultValue);
/libcore/ojluni/src/main/java/java/util/logging/
H A DLogManager.java1474 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/jsr166-tests/src/test/java/jsr166/
H A DJSR166TestCase.java177 private static float systemPropertyValue(String name, float defaultValue) { argument
180 return defaultValue;
/libcore/benchmarks/src/benchmarks/regression/
H A DR.java1513 public static final int defaultValue = 0; field in class:R

Completed in 244 milliseconds