Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 722 for Iterator (0.12 sec)

  1. 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)
  2. guava-tests/test/com/google/common/collect/SetsTest.java

        }
        try {
          Iterator<Integer> iterator = unmod.iterator();
          iterator.next();
          iterator.remove();
          fail("UnsupportedOperationException expected");
        } catch (UnsupportedOperationException expected) {
        }
        try {
          Iterator<Integer> iterator = unmod.descendingIterator();
          iterator.next();
          iterator.remove();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 48.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ArrayTable.java

     * iteration ordering across rows and columns in the table's views. None of the view iterators
     * support {@link Iterator#remove}. If the table is modified after an iterator is created, the
     * iterator remains valid.
     *
     * <p>This class requires less memory than the {@link HashBasedTable} and {@link TreeBasedTable}
     * implementations, except when the table is sparse.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/TestIteratorGenerator.java

    package com.google.common.collect.testing;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.Iterator;
    
    /**
     * Creates iterators to be tested.
     *
     * @param <E> the element type of the iterator.
     * @author George van den Driessche
     */
    @GwtCompatible
    public interface TestIteratorGenerator<E> {
      Iterator<E> get();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 938 bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/UnmodifiableIteratorTest.java

                  throw new NoSuchElementException();
                }
                return array[i++];
              }
            };
    
        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
        assertThrows(UnsupportedOperationException.class, () -> iterator.remove());
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/LinkedListMultimap.java

        }
    
        void setValue(@ParametricNullness V value) {
          checkState(current != null);
          current.value = value;
        }
      }
    
      /** An {@code Iterator} over distinct keys in key head order. */
      private class DistinctKeyIterator implements Iterator<K> {
        final Set<K> seenKeys = Sets.<K>newHashSetWithExpectedSize(keySet().size());
        @CheckForNull Node<K, V> next = head;
        @CheckForNull Node<K, V> current;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/MapPutTester.java

      public void testPutAbsentConcurrentWithEntrySetIteration() {
        assertThrows(
            ConcurrentModificationException.class,
            () -> {
              Iterator<Entry<K, V>> iterator = getMap().entrySet().iterator();
              put(e3());
              iterator.next();
            });
      }
    
      @MapFeature.Require({FAILS_FAST_ON_CONCURRENT_MODIFICATION, SUPPORTS_PUT})
      @CollectionSize.Require(absent = ZERO)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/RemovalCause.java

     * the License.
     */
    
    package com.google.common.cache;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.concurrent.ConcurrentMap;
    
    /**
     * The reason why a cached entry was removed.
     *
     * @author Charles Fry
     * @since 10.0
     */
    @GwtCompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 18:00:07 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

    import com.google.common.collect.TestExceptions.SomeUncheckedException;
    import com.google.common.testing.GcFinalization;
    import java.lang.ref.WeakReference;
    import java.util.Iterator;
    import java.util.NoSuchElementException;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit test for {@code AbstractIterator}.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

    import com.google.common.collect.TestExceptions.SomeUncheckedException;
    import com.google.common.testing.GcFinalization;
    import java.lang.ref.WeakReference;
    import java.util.Iterator;
    import java.util.NoSuchElementException;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit test for {@code AbstractIterator}.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top