Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 395 for iterator (0.08 sec)

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

       * elements in {@code a}, followed by the elements in {@code b}, followed by the elements in
       * {@code c}. The source iterators are not polled until necessary.
       *
       * <p>The returned iterator supports {@code remove()} when the corresponding input iterator
       * supports it.
       */
      public static <T extends @Nullable Object> Iterator<T> concat(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java

        assertTrue(
            multimap()
                .putAll(
                    k0(),
                    new Iterable<V>() {
                      @Override
                      public Iterator<V> iterator() {
                        return Lists.newArrayList(v3(), v4()).iterator();
                      }
                    }));
        assertGet(k0(), v0(), v3(), v4());
      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(SUPPORTS_PUT)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java

        return (MinimalIterable) of(elements.toArray());
      }
    
      private @Nullable Iterator<E> iterator;
    
      private MinimalIterable(Iterator<E> iterator) {
        this.iterator = iterator;
      }
    
      @Override
      public Iterator<E> iterator() {
        if (iterator == null) {
          // TODO: throw something else? Do we worry that people's code and tests
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

        assertNextThrows(iterator);
    
        /* Checks the case where a later element throws an exception. */
    
        list = Lists.newArrayList(1, 2);
        iterator = peekingIterator(new ThrowsAtEndIterator<Integer>(list));
        assertTrue(iterator.hasNext());
        iterator.next();
        assertTrue(iterator.hasNext());
        iterator.next();
        assertNextThrows(iterator);
      }
    
      private void assertNextThrows(Iterator<?> iterator) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. android/guava/src/com/google/common/collect/Collections2.java

        }
    
        @Override
        public boolean isEmpty() {
          return !Iterables.any(unfiltered, predicate);
        }
    
        @Override
        public Iterator<E> iterator() {
          return Iterators.filter(unfiltered.iterator(), predicate);
        }
    
        @Override
        public boolean remove(@CheckForNull Object element) {
          return contains(element) && unfiltered.remove(element);
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/MapsTransformValuesUnmodifiableIteratorTest.java

        assertFalse(underlying.containsKey("b"));
    
        Iterator<String> keyIterator = keys.iterator();
        keyIterator.next();
        keyIterator.remove();
        assertFalse(underlying.containsKey("c"));
    
        Collection<String> values = map.values();
        values.remove("4");
        assertFalse(underlying.containsKey("d"));
    
        Iterator<String> valueIterator = values.iterator();
        valueIterator.next();
        valueIterator.remove();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/collect/testing/MinimalIterableTest.java

        assertThrows(NoSuchElementException.class, () -> iterator.next());
        assertThrows(IllegalStateException.class, () -> iterable.iterator());
      }
    
      public void testOf_one() {
        Iterable<String> iterable = MinimalIterable.of("a");
        Iterator<String> iterator = iterable.iterator();
        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
        assertFalse(iterator.hasNext());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top