Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for computeNext (0.05 sec)

  1. android/guava-tests/test/com/google/common/collect/AbstractSequentialIteratorTest.java

          @Override
          protected @Nullable Integer computeNext(Integer previous) {
            return (previous == last) ? null : previous * 2;
          }
        };
      }
    
      private static class EmptyAbstractSequentialIterator<T> extends AbstractSequentialIterator<T> {
    
        EmptyAbstractSequentialIterator() {
          super(null);
        }
    
        @Override
        protected T computeNext(T previous) {
          throw new AssertionFailedError();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/AbstractIterator.java

      protected AbstractIterator() {}
    
      private enum State {
        READY,
        NOT_READY,
        DONE,
        FAILED,
      }
    
      private @Nullable T next;
    
      protected abstract @Nullable T computeNext();
    
      @CanIgnoreReturnValue
      protected final @Nullable T endOfData() {
        state = State.DONE;
        return null;
      }
    
      @Override
      public final boolean hasNext() {
        checkState(state != State.FAILED);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/AbstractSequentialIterator.java

       */
      protected abstract @Nullable T computeNext(T previous);
    
      @Override
      public final boolean hasNext() {
        return nextOrNull != null;
      }
    
      @Override
      public final T next() {
        if (nextOrNull == null) {
          throw new NoSuchElementException();
        }
        T oldNext = nextOrNull;
        nextOrNull = computeNext(oldNext);
        return oldNext;
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

        // second, then signals that it's reached the end of the data
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              private int rep;
    
              @Override
              public @Nullable Integer computeNext() {
                switch (rep++) {
                  case 0:
                    return 0;
                  case 1:
                    return 1;
                  case 2:
                    return endOfData();
                  default:
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/AbstractIterator.java

      protected AbstractIterator() {}
    
      private enum State {
        READY,
        NOT_READY,
        DONE,
        FAILED,
      }
    
      private @Nullable T next;
    
      protected abstract @Nullable T computeNext();
    
      @CanIgnoreReturnValue
      protected final @Nullable T endOfData() {
        state = State.DONE;
        return null;
      }
    
      @Override
      public final boolean hasNext() {
        checkState(state != State.FAILED);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/AbstractSequentialIterator.java

       */
      protected abstract @Nullable T computeNext(T previous);
    
      @Override
      public final boolean hasNext() {
        return nextOrNull != null;
      }
    
      @Override
      public final T next() {
        if (nextOrNull == null) {
          throw new NoSuchElementException();
        }
        T oldNext = nextOrNull;
        nextOrNull = computeNext(oldNext);
        return oldNext;
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/graph/DirectedGraphConnections.java

              Set<N> seenNodes = new HashSet<>();
              return new AbstractIterator<N>() {
                @Override
                protected @Nullable N computeNext() {
                  while (nodeConnections.hasNext()) {
                    NodeConnection<N> nodeConnection = nodeConnections.next();
                    boolean added = seenNodes.add(nodeConnection.node);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Jan 18 02:54:30 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/TreeRangeSet.java

                      .values()
                      .iterator();
            }
          }
          return new AbstractIterator<Entry<Cut<C>, Range<C>>>() {
            @Override
            protected @Nullable Entry<Cut<C>, Range<C>> computeNext() {
              if (!backingItr.hasNext()) {
                return endOfData();
              }
              Range<C> range = backingItr.next();
              if (upperBoundWindow.upperBound.isLessThan(range.upperBound)) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 32.3K bytes
    - Viewed (0)
  9. 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
        protected @Nullable EndpointPair<N> computeNext() {
          while (true) {
            if (successorIterator.hasNext()) {
              // requireNonNull is safe because successorIterator is empty until we set this.node.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RegularContiguousSet.java

      }
    
      @Override
      public UnmodifiableIterator<C> iterator() {
        return new AbstractSequentialIterator<C>(first()) {
          final C last = last();
    
          @Override
          protected @Nullable C computeNext(C previous) {
            return equalsOrThrow(previous, last) ? null : domain.next(previous);
          }
        };
      }
    
      @GwtIncompatible // NavigableSet
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.3K bytes
    - Viewed (0)
Back to top