Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 722 for Iterator (0.06 sec)

  1. guava-testlib/src/com/google/common/collect/testing/google/MultisetIteratorTester.java

    import com.google.common.collect.testing.features.CollectionFeature;
    import java.lang.reflect.Method;
    import java.util.Iterator;
    import java.util.List;
    import org.checkerframework.checker.nullness.qual.Nullable;
    import org.junit.Ignore;
    
    /**
     * Tester to make sure the {@code iterator().remove()} implementation of {@code Multiset} works when
     * there are multiple occurrences of elements.
     *
     * @author Louis Wasserman
     */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. 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();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 21 10:16:44 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/MultisetEntrySetTester.java

      public void testEntrySet_iteratorRemovePropagates() {
        Iterator<Multiset.Entry<E>> iterator = getMultiset().entrySet().iterator();
        assertTrue(
            "non-empty multiset.entrySet() iterator.hasNext() returned false", iterator.hasNext());
        assertEquals(
            "multiset.entrySet() iterator.next() returned incorrect entry",
            Multisets.immutableEntry(e0(), 1),
            iterator.next());
        assertFalse(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java

                    new TransferResourceAndSize(resource, event.getTransferredBytes()));
    
            buffer.append("Progress (").append(transfers.size()).append("): ");
    
            Iterator<TransferResourceAndSize> entries = transfers.values().iterator();
            while (entries.hasNext()) {
                TransferResourceAndSize entry = entries.next();
                // just in case, make sure 0 <= complete <= total
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/MapClearTester.java

        assertFalse(getMap().entrySet().iterator().hasNext());
      }
    
      @MapFeature.Require({FAILS_FAST_ON_CONCURRENT_MODIFICATION, SUPPORTS_REMOVE})
      @CollectionSize.Require(SEVERAL)
      public void testClearConcurrentWithEntrySetIteration() {
        assertThrows(
            ConcurrentModificationException.class,
            () -> {
              Iterator<Entry<K, V>> iterator = getMap().entrySet().iterator();
              getMap().clear();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionIteratorTester.java

          @Override
          protected Iterator<E> newTargetIterator() {
            resetCollection();
            return collection.iterator();
          }
    
          @Override
          protected void verify(List<E> elements) {
            expectContents(elements);
          }
        }.test();
      }
    
      public void testIteratorNoSuchElementException() {
        Iterator<E> iterator = collection.iterator();
        while (iterator.hasNext()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

          return;
        }
    
        Set<Entry<K, V>> entrySet = map.entrySet();
        Iterator<Entry<K, V>> iterator = entrySet.iterator();
        if (supportsIteratorRemove) {
          int initialSize = map.size();
          Entry<K, V> entry = iterator.next();
          Entry<K, V> entryCopy = mapEntry(entry.getKey(), entry.getValue());
    
          iterator.remove();
          assertEquals(initialSize - 1, map.size());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ForwardingSortedMultiset.java

      /**
       * A sensible definition of {@link #firstEntry()} in terms of {@code entrySet().iterator()}.
       *
       * <p>If you override {@link #entrySet()}, you may wish to override {@link #firstEntry()} to
       * forward to this implementation.
       */
      @CheckForNull
      protected Entry<E> standardFirstEntry() {
        Iterator<Entry<E>> entryIterator = entrySet().iterator();
        if (!entryIterator.hasNext()) {
          return null;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapEntriesTester.java

        Iterator<Entry<K, V>> iterator = multimap().entries().iterator();
        assertEquals(mapEntry(k0(), v0()), iterator.next());
        iterator.remove();
        assertTrue(multimap().isEmpty());
      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testEntriesRemainValidAfterRemove() {
        Iterator<Entry<K, V>> iterator = multimap().entries().iterator();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        Iterator<String> iterator = asList("a", "b", "a").iterator();
        Multiset<String> multiset = ImmutableMultiset.copyOf(iterator);
        assertEquals(HashMultiset.create(asList("a", "b", "a")), multiset);
      }
    
      public void testCopyOf_iteratorContainingNull() {
        Iterator<@Nullable String> iterator =
            Arrays.<@Nullable String>asList("a", null, "b").iterator();
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 24.9K bytes
    - Viewed (0)
Back to top