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

Method hasNext

src/main/java/com/google/gson/JsonStreamParser.java:102–112  ·  view source on GitHub ↗

Returns true if a JsonElement is available on the input for consumption @return true if a JsonElement is available on the input, false otherwise @since 1.4

()

Source from the content-addressed store, hash-verified

100 * @since 1.4
101 */
102 public boolean hasNext() {
103 synchronized (lock) {
104 try {
105 return parser.peek() != JsonToken.END_DOCUMENT;
106 } catch (MalformedJsonException e) {
107 throw new JsonSyntaxException(e);
108 } catch (IOException e) {
109 throw new JsonIOException(e);
110 }
111 }
112 }
113
114 /**
115 * This optional {@link Iterator} method is not relevant for stream parsing and hence is not

Callers 2

nextMethod · 0.95

Calls 1

peekMethod · 0.45

Tested by 1