Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for itr (0.06 sec)

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

        Multiset.Entry<E> entry = getOnlyElement(getMultiset().entrySet());
        assertEquals(3, entry.getCount());
        Iterator<E> itr = getMultiset().iterator();
        itr.next();
        itr.remove();
        assertEquals(2, entry.getCount());
        itr.next();
        itr.remove();
        itr.next();
        itr.remove();
        assertEquals(0, entry.getCount());
      }
    
      @CollectionSize.Require(SEVERAL)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

      @CollectionFeature.Require(SUPPORTS_ITERATOR_REMOVE)
      public void testKeysEntrySetIteratorRemove() {
        Multiset<K> keys = multimap().keys();
        Iterator<Multiset.Entry<K>> itr = keys.entrySet().iterator();
        assertEquals(Multisets.immutableEntry(k0(), 1), itr.next());
        itr.remove();
        assertTrue(multimap().isEmpty());
      }
    
      @CollectionSize.Require(SEVERAL)
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testKeysEntrySetRemove() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/FilteredEntryMultimap.java

          @SuppressWarnings("unchecked") // it's definitely equal to a K
          K k = (K) key;
          List<V> result = Lists.newArrayList();
          Iterator<V> itr = collection.iterator();
          while (itr.hasNext()) {
            V v = itr.next();
            if (satisfies(k, v)) {
              itr.remove();
              result.add(v);
            }
          }
          if (result.isEmpty()) {
            return null;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Collections2.java

        }
    
        @Override
        public boolean removeAll(final Collection<?> collection) {
          boolean changed = false;
          Iterator<E> itr = unfiltered.iterator();
          while (itr.hasNext()) {
            E e = itr.next();
            if (predicate.apply(e) && collection.contains(e)) {
              itr.remove();
              changed = true;
            }
          }
          return changed;
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetEntrySetTester.java

        Multiset.Entry<E> entry = getOnlyElement(getMultiset().entrySet());
        assertEquals(3, entry.getCount());
        Iterator<E> itr = getMultiset().iterator();
        itr.next();
        itr.remove();
        assertEquals(2, entry.getCount());
        itr.next();
        itr.remove();
        itr.next();
        itr.remove();
        assertEquals(0, entry.getCount());
      }
    
      @CollectionSize.Require(SEVERAL)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/FilteredEntryMultimap.java

          @SuppressWarnings("unchecked") // it's definitely equal to a K
          K k = (K) key;
          List<V> result = Lists.newArrayList();
          Iterator<V> itr = collection.iterator();
          while (itr.hasNext()) {
            V v = itr.next();
            if (satisfies(k, v)) {
              itr.remove();
              result.add(v);
            }
          }
          if (result.isEmpty()) {
            return null;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

      @CollectionFeature.Require(SUPPORTS_ITERATOR_REMOVE)
      public void testKeysEntrySetIteratorRemove() {
        Multiset<K> keys = multimap().keys();
        Iterator<Multiset.Entry<K>> itr = keys.entrySet().iterator();
        assertEquals(Multisets.immutableEntry(k0(), 1), itr.next());
        itr.remove();
        assertTrue(multimap().isEmpty());
      }
    
      @CollectionSize.Require(SEVERAL)
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testKeysEntrySetRemove() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/AbstractIteratorTest.java

      @AndroidIncompatible // depends on details of GC
      public void testFreesNextReference() {
        Iterator<Object> itr =
            new AbstractIterator<Object>() {
              @Override
              public Object computeNext() {
                return new Object();
              }
            };
        WeakReference<Object> ref = new WeakReference<>(itr.next());
        GcFinalization.awaitClear(ref);
      }
    
      public void testReentrantHasNext() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/TreeTraverser.java

        }
    
        @Override
        public boolean hasNext() {
          return !stack.isEmpty();
        }
    
        @Override
        public T next() {
          Iterator<T> itr = stack.getLast(); // throws NSEE if empty
          T result = checkNotNull(itr.next());
          if (!itr.hasNext()) {
            stack.removeLast();
          }
          Iterator<T> childItr = children(result).iterator();
          if (childItr.hasNext()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

      @AndroidIncompatible // depends on details of GC
      public void testFreesNextReference() {
        Iterator<Object> itr =
            new AbstractIterator<Object>() {
              @Override
              public Object computeNext() {
                return new Object();
              }
            };
        WeakReference<Object> ref = new WeakReference<>(itr.next());
        GcFinalization.awaitClear(ref);
      }
    
    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