Searched refs:optDouble (Results 1 – 5 of 5) sorted by relevance
/libcore/json/src/test/java/libcore/org/json/ |
D | SelfUseTest.java | 64 @Override public double optDouble(String key, double defaultValue) { 66 return super.optDouble(key, defaultValue); 99 @Override public double optDouble(int index, double fallback) { 101 return super.optDouble(index, fallback); 149 object.optDouble("foo"); in testObjectOptType() 196 array.optDouble(3); in testArrayOptType()
|
D | JSONObjectTest.java | 101 assertEquals(Double.NaN, object.optDouble("foo")); in testEmptyObject() 102 assertEquals(5.0, object.optDouble("foo", 5.0)); in testEmptyObject() 303 assertEquals(Double.MAX_VALUE, object.optDouble("baz")); in testNumbers() 307 assertEquals(Double.MAX_VALUE, object.optDouble("baz")); in testNumbers() 309 assertEquals(Double.MIN_VALUE, object.optDouble("foo", 5.0d)); in testNumbers() 451 assertEquals(Double.NaN, object.optDouble("quux")); in testStrings() 452 assertEquals(-1.0d, object.optDouble("quux", -1.0d)); in testStrings() 853 assertEquals(Double.NaN, object.optDouble(null)); in testOptNull() 860 assertEquals(0.0d, object.optDouble(null, 0.0d)); in testOptNull()
|
D | JSONArrayTest.java | 232 assertEquals(Double.MIN_VALUE, array.optDouble(0)); in testNumbers() 299 assertEquals(Double.NaN, array.optDouble(3)); in testStrings() 300 assertEquals(-1.0d, array.optDouble(3, -1.0d)); in testStrings()
|
/libcore/json/src/main/java/org/json/ |
D | JSONArray.java | 375 public double optDouble(int index) { in optDouble() method in JSONArray 376 return optDouble(index, Double.NaN); in optDouble() 383 public double optDouble(int index, double fallback) { in optDouble() method in JSONArray
|
D | JSONObject.java | 467 public double optDouble(@Nullable String name) { in optDouble() method in JSONObject 468 return optDouble(name, Double.NaN); in optDouble() 475 public double optDouble(@Nullable String name, double fallback) { in optDouble() method in JSONObject
|