MCPcopy
hub / github.com/google/gson / hasNext

Method hasNext

gson/src/main/java/com/google/gson/stream/JsonReader.java:533–539  ·  view source on GitHub ↗

Returns true if the current array or object has another element.

()

Source from the content-addressed store, hash-verified

531
532 /** Returns true if the current array or object has another element. */
533 public boolean hasNext() throws IOException {
534 int p = peeked;
535 if (p == PEEKED_NONE) {
536 p = doPeek();
537 }
538 return p != PEEKED_END_OBJECT && p != PEEKED_END_ARRAY && p != PEEKED_EOF;
539 }
540
541 /** Returns the type of the next token without consuming it. */
542 public JsonToken peek() throws IOException {

Callers 15

testReadEmptyArrayMethod · 0.95
testReadEmptyObjectMethod · 0.95
readMethod · 0.45
readRepeatedFieldMethod · 0.45
readMessageFieldMethod · 0.45
readByteStringMethod · 0.45
testKeySetMethod · 0.45

Calls 1

doPeekMethod · 0.95

Tested by 10

testReadEmptyArrayMethod · 0.76
testReadEmptyObjectMethod · 0.76
testKeySetMethod · 0.36
testEntrySetMethod · 0.36
testIteratorMethod · 0.36
toIntArrayMethod · 0.36