MCPcopy Create free account
hub / github.com/Asana/java-asana / hasNext

Method hasNext

src/main/java/com/asana/iterator/PageIterator.java:75–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 @Override
76 public boolean hasNext() {
77 while (nextData == null && ioException == null && this.continuation != null && this.count < this.itemLimit) {
78 retrieveNextPage();
79 }
80
81 // If an IOException occurred, we return true to indicate another element is available. However, next() will
82 // then throw a NoSuchElementException with the IOException as cause. The motivation for this is keeping the
83 // public API backwards compatible.
84 return nextData != null || ioException != null;
85 }
86
87 @Override
88 public Collection<T> next() throws NoSuchElementException {

Calls 1

retrieveNextPageMethod · 0.95