- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for computeNext (0.1 sec)
-
guava-tests/test/com/google/common/base/AbstractIteratorTest.java
// Make sure computeNext() doesn't get invoked again assertFalse(iter.hasNext()); assertThrows(NoSuchElementException.class, iter::next); } public void testSneakyThrow() throws Exception { Iterator<Integer> iter = new AbstractIterator<Integer>() { boolean haveBeenCalled; @Override public Integer computeNext() { if (haveBeenCalled) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractIterator.java
* IllegalStateException}. */ @CheckForNull protected abstract T computeNext(); /** * Implementations of {@link #computeNext} <b>must</b> invoke this method when there are no * elements left in the iteration. * * @return {@code null}; a convenience so your {@code computeNext} implementation can use the * simple statement {@code return endOfData();} */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Mar 18 02:04:10 UTC 2022 - 6.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 8.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/AbstractIteratorTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 8.1K bytes - Viewed (0) -
guava/src/com/google/common/base/AbstractIterator.java
protected AbstractIterator() {} private enum State { READY, NOT_READY, DONE, FAILED, } @CheckForNull private T next; @CheckForNull protected abstract T computeNext(); @CanIgnoreReturnValue @CheckForNull protected final T endOfData() { state = State.DONE; return null; } @Override public final boolean hasNext() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jul 09 17:31:04 UTC 2021 - 2.5K bytes - Viewed (0) -
guava/src/com/google/common/collect/ConsumingQueueIterator.java
private final Queue<T> queue; ConsumingQueueIterator(Queue<T> queue) { this.queue = checkNotNull(queue); } @Override @CheckForNull protected T computeNext() { // TODO(b/192579700): Use a ternary once it no longer confuses our nullness checker. if (queue.isEmpty()) { return endOfData(); } return queue.remove(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Jan 21 14:48:03 UTC 2023 - 1.5K bytes - Viewed (0) -
guava/src/com/google/common/graph/EndpointPairIterator.java
private static final class Directed<N> extends EndpointPairIterator<N> { private Directed(BaseGraph<N> graph) { super(graph); } @Override @CheckForNull protected EndpointPair<N> computeNext() { while (true) { if (successorIterator.hasNext()) { // requireNonNull is safe because successorIterator is empty until we set this.node.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jul 09 17:31:04 UTC 2021 - 5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularContiguousSet.java
} @Override public UnmodifiableIterator<C> iterator() { return new AbstractSequentialIterator<C>(first()) { final C last = last(); @Override @CheckForNull protected C computeNext(C previous) { return equalsOrThrow(previous, last) ? null : domain.next(previous); } }; } @GwtIncompatible // NavigableSet @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 21:19:52 UTC 2024 - 8.4K bytes - Viewed (0) -
guava/src/com/google/common/graph/MultiEdgesConnecting.java
public UnmodifiableIterator<E> iterator() { Iterator<? extends Entry<E, ?>> entries = outEdgeToNode.entrySet().iterator(); return new AbstractIterator<E>() { @Override @CheckForNull protected E computeNext() { while (entries.hasNext()) { Entry<E, ?> entry = entries.next(); if (targetNode.equals(entry.getValue())) { return entry.getKey(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 06 00:47:57 UTC 2021 - 2.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/TreeTraverser.java
PostOrderIterator(T root) { this.stack = new ArrayDeque<>(); stack.addLast(expand(root)); } @Override @CheckForNull protected T computeNext() { while (!stack.isEmpty()) { PostOrderNode<T> top = stack.getLast(); if (top.childIterator.hasNext()) { T child = top.childIterator.next(); stack.addLast(expand(child));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 8.9K bytes - Viewed (0)