Searched refs:optLong (Results 1 – 5 of 5) sorted by relevance
/libcore/json/src/test/java/libcore/org/json/ |
D | SelfUseTest.java | 72 @Override public long optLong(String key, long defaultValue) { 74 return super.optLong(key, defaultValue); 103 @Override public long optLong(int index, long fallback) { 105 return super.optLong(index, fallback); 155 object.optLong("foo"); in testObjectOptType() 202 array.optLong(3); in testArrayOptType()
|
D | JSONObjectTest.java | 107 assertEquals(0, object.optLong("foo")); in testEmptyObject() 108 assertEquals(Long.MAX_VALUE-1, object.optLong("foo", Long.MAX_VALUE-1)); in testEmptyObject() 302 assertEquals(9223372036854775806L, object.optLong("bar")); in testNumbers() 306 assertEquals(9223372036854775806L, object.optLong("bar")); in testNumbers() 310 assertEquals(9223372036854775806L, object.optLong("bar", 1L)); in testNumbers() 311 assertEquals(Long.MAX_VALUE, object.optLong("baz", 1L)); in testNumbers() 855 assertEquals(0L, object.optLong(null)); in testOptNull() 862 assertEquals(1L, object.optLong(null, 1L)); in testOptNull()
|
D | JSONArrayTest.java | 233 assertEquals(0, array.optLong(0, 1L)); in testNumbers()
|
/libcore/json/src/main/java/org/json/ |
D | JSONArray.java | 443 public long optLong(int index) { in optLong() method in JSONArray 444 return optLong(index, 0L); in optLong() 451 public long optLong(int index, long fallback) { in optLong() method in JSONArray
|
D | JSONObject.java | 538 public long optLong(@Nullable String name) { in optLong() method in JSONObject 539 return optLong(name, 0L); in optLong() 548 public long optLong(@Nullable String name, long fallback) { in optLong() method in JSONObject
|