Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Multisets.java

            // TODO(lowasser): consider making the entries live views
            return new AbstractIterator<Entry<E>>() {
              @Override
              @CheckForNull
              protected Entry<E> computeNext() {
                if (iterator1.hasNext()) {
                  Entry<? extends E> entry1 = iterator1.next();
                  E element = entry1.getElement();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/Multisets.java

            // TODO(lowasser): consider making the entries live views
            return new AbstractIterator<Entry<E>>() {
              @Override
              @CheckForNull
              protected Entry<E> computeNext() {
                if (iterator1.hasNext()) {
                  Entry<? extends E> entry1 = iterator1.next();
                  E element = entry1.getElement();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/TreeRangeMap.java

                      .values()
                      .iterator();
              return new AbstractIterator<Entry<Range<K>, V>>() {
    
                @Override
                @CheckForNull
                protected Entry<Range<K>, V> computeNext() {
                  if (backingItr.hasNext()) {
                    RangeMapEntry<K, V> entry = backingItr.next();
                    if (entry.getUpperBound().compareTo(subRange.lowerBound) <= 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/DenseImmutableTable.java

          return new AbstractIterator<Entry<K, V>>() {
            private int index = -1;
            private final int maxIndex = keyToIndex().size();
    
            @Override
            @CheckForNull
            protected Entry<K, V> computeNext() {
              for (index++; index < maxIndex; index++) {
                V value = getValue(index);
                if (value != null) {
                  return immutableEntry(getKey(index), value);
                }
              }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableRangeSet.java

          return new AbstractIterator<C>() {
            final Iterator<Range<C>> rangeItr = ranges.iterator();
            Iterator<C> elemItr = emptyIterator();
    
            @Override
            @CheckForNull
            protected C computeNext() {
              while (!elemItr.hasNext()) {
                if (rangeItr.hasNext()) {
                  elemItr = ContiguousSet.create(rangeItr.next(), domain).iterator();
                } else {
                  return endOfData();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Collections2.java

          this.nextPermutation = Lists.newArrayList(list);
          this.comparator = comparator;
        }
    
        @Override
        @CheckForNull
        protected List<E> computeNext() {
          if (nextPermutation == null) {
            return endOfData();
          }
          ImmutableList<E> next = ImmutableList.copyOf(nextPermutation);
          calculateNextPermutation();
          return next;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  10. 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)
Back to top