Home
last modified time | relevance | path

Searched refs:defaultValue (Results 1 – 20 of 20) sorted by relevance

/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/
DAnnotationsTest.java54 assertEquals((byte) 5, defaultValue("a")); in testAnnotationDefaults()
55 assertEquals((short) 6, defaultValue("b")); in testAnnotationDefaults()
56 assertEquals(7, defaultValue("c")); in testAnnotationDefaults()
57 assertEquals(8L, defaultValue("d")); in testAnnotationDefaults()
58 assertEquals(9.0f, defaultValue("e")); in testAnnotationDefaults()
59 assertEquals(10.0, defaultValue("f")); in testAnnotationDefaults()
60 assertEquals('k', defaultValue("g")); in testAnnotationDefaults()
61 assertEquals(true, defaultValue("h")); in testAnnotationDefaults()
62 assertEquals(Breakfast.WAFFLES, defaultValue("i")); in testAnnotationDefaults()
63 assertEquals("@" + AnnotationA.class.getName() + "()", defaultValue("j").toString()); in testAnnotationDefaults()
[all …]
/libcore/json/src/test/java/libcore/org/json/
DSelfUseTest.java60 @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);
/libcore/luni/src/test/java/libcore/java/util/
DMapDefaultMethodTester.java100 V expected, Map<K, V> map, K key, V defaultValue) { in checkGetOrDefault() argument
101 V actual = map.getOrDefault(key, defaultValue); in checkGetOrDefault()
104 assertSame(expected, getOrDefault_hashMap(map, key, defaultValue)); in checkGetOrDefault()
105 assertSame(expected, getOrDefault_optimizeForPresent(map, key, defaultValue)); in checkGetOrDefault()
106 assertSame(expected, getOrDefault_optimizeForAbsent(map, key, defaultValue)); in checkGetOrDefault()
110 private static<K, V> V getOrDefault_hashMap(Map<K, V> map, K key, V defaultValue) { in getOrDefault_hashMap() argument
111 return new HashMap<>(map).getOrDefault(key, defaultValue); in getOrDefault_hashMap()
118 private static<K, V> V getOrDefault_optimizeForAbsent(Map<K, V> map, K key, V defaultValue) { in getOrDefault_optimizeForAbsent() argument
119 return map.containsKey(key) ? map.get(key) : defaultValue; in getOrDefault_optimizeForAbsent()
126 private static<K, V> V getOrDefault_optimizeForPresent(Map<K, V> map, K key, V defaultValue) { in getOrDefault_optimizeForPresent() argument
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/logging/
DLogManager.java154 java.lang.String getStringProperty(java.lang.String name, java.lang.String defaultValue) { in getStringProperty() argument
158 int getIntProperty(java.lang.String name, int defaultValue) { in getIntProperty() argument
162 boolean getBooleanProperty(java.lang.String name, boolean defaultValue) { in getBooleanProperty() argument
167 java.lang.String name, java.util.logging.Level defaultValue) { in getLevelProperty() argument
172 java.lang.String name, java.util.logging.Filter defaultValue) { in getFilterProperty() argument
178 java.lang.String name, java.util.logging.Formatter defaultValue) { in getFormatterProperty() argument
/libcore/ojluni/annotations/mmodule/java/util/
DLinkedHashMap.annotated.java47 public V getOrDefault(java.lang.Object key, V defaultValue) { throw new RuntimeException("Stub!"); } in getOrDefault() argument
/libcore/ojluni/annotations/hiddenapi/java/util/
DProperties.java112 public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue) { in getProperty() argument
DLinkedHashMap.java110 public V getOrDefault(java.lang.Object key, V defaultValue) { in getOrDefault() argument
DHashMap.java143 public V getOrDefault(java.lang.Object key, V defaultValue) { in getOrDefault() argument
/libcore/ojluni/src/main/java/java/util/
DProperties.java1002 public String getProperty(String key, String defaultValue) { in getProperty() argument
1004 return (val == null) ? defaultValue : val; in getProperty()
DLinkedHashMap.java474 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() argument
477 return defaultValue; in getOrDefault()
DMap.java614 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() argument
618 : defaultValue; in getOrDefault()
DCollections.java1545 public V getOrDefault(Object k, V defaultValue) {
1547 return ((Map<K, V>)m).getOrDefault(k, defaultValue);
2693 public V getOrDefault(Object k, V defaultValue) {
2694 synchronized (mutex) {return m.getOrDefault(k, defaultValue);}
4649 public V getOrDefault(Object k, V defaultValue) {
4650 return defaultValue;
4961 public V getOrDefault(Object key, V defaultValue) {
4962 return eq(key, k) ? v : defaultValue;
DHashtable.java865 public synchronized V getOrDefault(Object key, V defaultValue) { in getOrDefault() argument
867 return (null == result) ? defaultValue : result; in getOrDefault()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DHashMap.annotated.java65 …@libcore.util.Nullable java.lang.Object key, @libcore.util.Nullable V defaultValue) { throw new Ru… in getOrDefault() argument
DMap.annotated.java62 …@libcore.util.Nullable java.lang.Object key, @libcore.util.Nullable V defaultValue) { throw new Ru… in getOrDefault() argument
/libcore/ojluni/annotations/mmodule/java/security/
DProvider.annotated.java85 … java.lang.Object getOrDefault(java.lang.Object key, java.lang.Object defaultValue) { throw new Ru… in getOrDefault() argument
/libcore/ojluni/annotations/hiddenapi/java/lang/
DClass.java336 private native int getInnerClassFlags(int defaultValue); in getInnerClassFlags() argument
/libcore/jsr166-tests/src/test/java/jsr166/
DJSR166TestCase.java177 private static float systemPropertyValue(String name, float defaultValue) { in systemPropertyValue() argument
180 return defaultValue; in systemPropertyValue()
/libcore/ojluni/src/main/java/java/security/
DProvider.java625 public synchronized Object getOrDefault(Object key, Object defaultValue) { in getOrDefault() argument
627 return super.getOrDefault(key, defaultValue); in getOrDefault()
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentSkipListMap.java1555 public V getOrDefault(Object key, V defaultValue) { in getOrDefault() argument
1557 return (v = doGet(key)) == null ? defaultValue : v; in getOrDefault()