MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / hasNext

Method hasNext

java/src/org/openqa/selenium/json/JsonInput.java:314–328  ·  view source on GitHub ↗

Determine whether an element is pending for the current container from the JSON input stream. @return true if an element is pending; otherwise false @throws JsonException if no container is open @throws UncheckedIOException if an I/O exception is encountered

()

Source from the content-addressed store, hash-verified

312 * @throws UncheckedIOException if an I/O exception is encountered
313 */
314 public boolean hasNext() {
315 if (stack.isEmpty()) {
316 throw new JsonException(
317 "Unable to determine if an item has next when not in a container type. " + input);
318 }
319
320 skipWhitespace(input);
321 if (input.peek() == ',') {
322 input.read();
323 return true;
324 }
325
326 JsonType type = peek();
327 return type != JsonType.END_COLLECTION && type != JsonType.END_MAP;
328 }
329
330 /**
331 * Process the opening square bracket of a JSON array.

Calls 4

skipWhitespaceMethod · 0.95
peekMethod · 0.95
readMethod · 0.65
isEmptyMethod · 0.45