Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 249 for iterators (0.06 sec)

  1. android/guava/src/com/google/common/collect/Iterables.java

        checkNotNull(iterable);
        Iterators.checkNonnegative(position);
        if (iterable instanceof List) {
          List<? extends T> list = Lists.cast(iterable);
          return (position < list.size()) ? list.get(position) : defaultValue;
        } else {
          Iterator<? extends T> iterator = iterable.iterator();
          Iterators.advance(iterator, position);
          return Iterators.getNext(iterator, defaultValue);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 42.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java

            @Override
            protected Set<K> delegate() {
              return delegate.keySet();
            }
    
            @Override
            public Iterator<K> iterator() {
              return Iterators.unmodifiableIterator(delegate.keySet().iterator());
            }
    
            @Override
            public boolean removeAll(Collection<?> c) {
              return delegate.keySet().removeAll(c);
            }
    
            @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/FluentIterable.java

          @Override
          public Iterator<T> iterator() {
            return Iterators.concat(
                /* lazily generate the iterators on each input only as needed */
                new AbstractIndexedListIterator<Iterator<? extends T>>(inputs.length) {
                  @Override
                  public Iterator<? extends T> get(int i) {
                    return inputs[i].iterator();
                  }
                });
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

            @Override
            public @Nullable Object execute(Iterator<?> iterator) {
              iterator.remove();
              return null;
            }
          };
    
      private static final IteratorOperation NEXT_METHOD =
          new IteratorOperation() {
            @Override
            public @Nullable Object execute(Iterator<?> iterator) {
              return iterator.next();
            }
          };
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/DirectedGraphConnections.java

          }
        };
      }
    
      @Override
      public Iterator<EndpointPair<N>> incidentEdgeIterator(N thisNode) {
        checkNotNull(thisNode);
    
        Iterator<EndpointPair<N>> resultWithDoubleSelfLoop;
        if (orderedNodeConnections == null) {
          resultWithDoubleSelfLoop =
              Iterators.concat(
                  Iterators.transform(
                      predecessors().iterator(),
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 18K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

      public void testCopyOf_iterator_oneElementRepeated() {
        Iterator<String> iterator = Iterators.forArray("a", "a", "a");
        Set<String> set = copyOf(iterator);
        assertEquals(singleton("a"), set);
      }
    
      public void testCopyOf_iterator_general() {
        Iterator<String> iterator = Iterators.forArray("a", "b", "a");
        Set<String> set = copyOf(iterator);
        assertEquals(2, set.size());
        assertTrue(set.contains("a"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multisets.java

          }
    
          @Override
          Iterator<E> elementIterator() {
            throw new AssertionError("should never be called");
          }
    
          @Override
          Iterator<Entry<E>> entryIterator() {
            final Iterator<? extends Entry<? extends E>> iterator1 = multiset1.entrySet().iterator();
            final Iterator<? extends Entry<? extends E>> iterator2 = multiset2.entrySet().iterator();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Multisets.java

          }
    
          @Override
          Iterator<E> elementIterator() {
            throw new AssertionError("should never be called");
          }
    
          @Override
          Iterator<Entry<E>> entryIterator() {
            final Iterator<? extends Entry<? extends E>> iterator1 = multiset1.entrySet().iterator();
            final Iterator<? extends Entry<? extends E>> iterator2 = multiset2.entrySet().iterator();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

            @Override
            public @Nullable Object execute(Iterator<?> iterator) {
              iterator.remove();
              return null;
            }
          };
    
      private static final IteratorOperation NEXT_METHOD =
          new IteratorOperation() {
            @Override
            public @Nullable Object execute(Iterator<?> iterator) {
              return iterator.next();
            }
          };
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

        }
      }
    
      /**
       * Verifies that an Iterator is unmodifiable.
       *
       * <p>This test only works with iterators that iterate over a finite set.
       */
      public static void assertIteratorIsUnmodifiable(Iterator<?> iterator) {
        while (iterator.hasNext()) {
          iterator.next();
          try {
            iterator.remove();
            fail("Remove on unmodifiable iterator succeeded");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
Back to top