Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for itr (0.01 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. src/test/java/org/codelibs/core/collection/EnumerationIteratorTest.java

            final Vector<String> vector = new Vector<String>();
            vector.add("a");
            final EnumerationIterator<String> itr = new EnumerationIterator<String>(vector.elements());
            assertThat(itr.hasNext(), is(true));
            assertThat(itr.next(), is("a"));
            assertThat(itr.hasNext(), is(not(true)));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/CartesianList.java

        }
        List<?> list = (List<?>) o;
        if (list.size() != axes.size()) {
          return -1;
        }
        ListIterator<?> itr = list.listIterator();
        int computedIndex = 0;
        while (itr.hasNext()) {
          int axisIndex = itr.nextIndex();
          int elemIndex = axes.get(axisIndex).indexOf(itr.next());
          if (elemIndex == -1) {
            return -1;
          }
          computedIndex += elemIndex * axesSizeProduct[axisIndex + 1];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/AbstractRangeSetTest.java

        }
    
        // test that the RangeSet's span is the span of all the ranges
        Iterator<Range<C>> itr = rangeSet.asRanges().iterator();
        Range<C> expectedSpan = null;
        if (itr.hasNext()) {
          expectedSpan = itr.next();
          while (itr.hasNext()) {
            expectedSpan = expectedSpan.span(itr.next());
          }
        }
    
        try {
          Range<C> span = rangeSet.span();
          assertEquals(expectedSpan, span);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 20:09:59 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/collection/ArrayIteratorTest.java

            final ArrayIterator<Integer> itr = new ArrayIterator<Integer>(new Integer[] { 1, 2 });
            itr.next();
            itr.next();
            itr.next();
        }
    
        /**
         *
         */
        @Test
        public void testHasNext() {
            final ArrayIterator<String> itr = new ArrayIterator<String>("A", "B");
            assertThat(itr.hasNext(), is(true));
            itr.next();
            assertThat(itr.hasNext(), is(true));
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. 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)
  9. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

        }
      }
    
      @Override
      final Iterator<E> elementIterator() {
        return new Itr<E>() {
          @Override
          @ParametricNullness
          E result(int entryIndex) {
            return backingMap.getKey(entryIndex);
          }
        };
      }
    
      @Override
      final Iterator<Entry<E>> entryIterator() {
        return new Itr<Entry<E>>() {
          @Override
          Entry<E> result(int entryIndex) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/CartesianList.java

        }
        List<?> list = (List<?>) o;
        if (list.size() != axes.size()) {
          return -1;
        }
        ListIterator<?> itr = list.listIterator();
        int computedIndex = 0;
        while (itr.hasNext()) {
          int axisIndex = itr.nextIndex();
          int elemIndex = axes.get(axisIndex).indexOf(itr.next());
          if (elemIndex == -1) {
            return -1;
          }
          computedIndex += elemIndex * axesSizeProduct[axisIndex + 1];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top