Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for itr (0.07 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-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)
  5. 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)
  6. 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)
  7. 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)
  8. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        assertEquals(ImmutableList.of(-1, 3, 5), result);
      }
    
      public void testLeastOfIterator_simple_nMinusOne_withNullElement() {
        Iterator<@Nullable Integer> itr = Iterators.forArray(3, null, 5, -1);
        List<@Nullable Integer> result = Ordering.<Integer>natural().nullsLast().leastOf(itr, 3);
        assertTrue(result instanceof RandomAccess);
        assertListImmutable(result);
        assertEquals(ImmutableList.of(-1, 3, 5), result);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/OrderingTest.java

        assertEquals(ImmutableList.of(-1, 3, 5), result);
      }
    
      public void testLeastOfIterator_simple_nMinusOne_withNullElement() {
        Iterator<@Nullable Integer> itr = Iterators.forArray(3, null, 5, -1);
        List<@Nullable Integer> result = Ordering.<Integer>natural().nullsLast().leastOf(itr, 3);
        assertTrue(result instanceof RandomAccess);
        assertListImmutable(result);
        assertEquals(ImmutableList.of(-1, 3, 5), result);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top