Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 197 for BiIterator (0.05 seconds)

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

      }
    
      public void testSize1() {
        Iterator<Integer> iterator = singleton(0).iterator();
        assertEquals(1, Iterators.size(iterator));
      }
    
      public void testSize_partiallyConsumed() {
        Iterator<Integer> iterator = asList(1, 2, 3, 4, 5).iterator();
        iterator.next();
        iterator.next();
        assertEquals(3, Iterators.size(iterator));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 57.3K bytes
    - Click Count (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/IteratorTester.java

    import java.util.Collections;
    import java.util.Iterator;
    import org.jspecify.annotations.NullMarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A utility for testing an Iterator implementation by comparing its behavior to that of a "known
     * good" reference implementation. In order to accomplish this, it's important to test a great
     * variety of sequences of the {@link Iterator#next}, {@link Iterator#hasNext} and {@link
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 4.3K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/collect/Collections2Test.java

        Iterator<List<Integer>> permutations = permutationSet.iterator();
        assertNextPermutation(Collections.<Integer>emptyList(), permutations);
        assertNoMorePermutations(permutations);
      }
    
      public void testPermutationSetOneElement() {
        Iterator<List<Integer>> permutations =
            Collections2.permutations(Collections.<Integer>singletonList(1)).iterator();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 20.1K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

      public void testCopyOf_iterator_empty() {
        Iterator<String> iterator = emptyIterator();
        Set<String> set = copyOf(iterator);
        assertEquals(Collections.<String>emptySet(), set);
        assertThat(set).isSameInstanceAs(this.<String>of());
      }
    
      public void testCopyOf_iterator_oneElement() {
        Iterator<String> iterator = singletonIterator("a");
        Set<String> set = copyOf(iterator);
        assertEquals(singleton("a"), set);
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 18.5K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/graph/Traverser.java

            @Override
            @Nullable N visitNext(Deque<Iterator<? extends N>> horizon) {
              Iterator<? extends N> top = horizon.getFirst();
              if (top.hasNext()) {
                return checkNotNull(top.next());
              }
              horizon.removeFirst();
              return null;
            }
          };
        }
    
        final Iterator<N> breadthFirst(Iterator<? extends N> startNodes) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 11 01:10:31 GMT 2026
    - 19.3K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/collect/FluentIterableTest.java

        FluentIterable<Integer> cycle = fluent(1, 2).cycle();
        Iterator<Integer> iterator = cycle.iterator();
        iterator.next();
        iterator.remove();
        iterator.next();
        iterator.remove();
        assertFalse(iterator.hasNext());
        assertFalse(cycle.iterator().hasNext());
      }
    
      public void testAppend() {
        FluentIterable<Integer> result =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 31.2K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/base/JoinerTest.java

        assertThat(j.join(ImmutableMultimap.of("", "").entries())).isEqualTo(":");
        assertThat(j.join(ImmutableMultimap.of("", "").entries().iterator())).isEqualTo(":");
        assertThat(j.join(ImmutableMultimap.of("1", "a", "1", "b").entries())).isEqualTo("1:a;1:b");
        assertThat(j.join(ImmutableMultimap.of("1", "a", "1", "b").entries().iterator()))
            .isEqualTo("1:a;1:b");
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 13.2K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/base/AbstractIteratorTest.java

        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              @Override
              public Integer computeNext() {
                endOfData();
                throw new SomeUncheckedException();
              }
            };
        assertThrows(SomeUncheckedException.class, iter::hasNext);
      }
    
      public void testCantRemove() {
        Iterator<Integer> iter =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

      }
    
      public void testCopyOf_iterator_general() {
        Iterator<String> iterator = asList("a", "b", "a").iterator();
        Multiset<String> multiset = ImmutableSortedMultiset.copyOf(iterator);
        assertEquals(HashMultiset.create(asList("a", "b", "a")), multiset);
      }
    
      public void testCopyOf_iteratorContainingNull() {
        Iterator<String> iterator = asList("a", null, "b").iterator();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 22.8K bytes
    - Click Count (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());
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 2.6K bytes
    - Click Count (0)
Back to Top