Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 722 for Iterator (0.07 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionClearTester.java

      @CollectionSize.Require(SEVERAL)
      public void testClearConcurrentWithIteration() {
        assertThrows(
            ConcurrentModificationException.class,
            () -> {
              Iterator<E> iterator = collection.iterator();
              collection.clear();
              iterator.next();
            });
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

        }
      }
    
      /**
       * Returns an iterator over the elements in this queue. The iterator does not return the elements
       * in any particular order. The returned {@code Iterator} is a "weakly consistent" iterator that
       * will never throw {@link ConcurrentModificationException}, and guarantees to traverse elements
       * as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 07 21:36:32 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ForwardingMultiset.java

        }
    
        @Override
        public Iterator<E> iterator() {
          return Multisets.elementIterator(multiset().entrySet().iterator());
        }
      }
    
      /**
       * A sensible definition of {@link #iterator} in terms of {@link #entrySet} and {@link
       * #remove(Object)}. If you override either of these methods, you may wish to override {@link
       * #iterator} to forward to this implementation.
       *
       * @since 7.0
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

       * was retrieved.
       */
      @Override
      public Set<Multiset.Entry<E>> entrySet() {
        return super.entrySet();
      }
    
      @Override
      Iterator<E> elementIterator() {
        final Iterator<Map.Entry<E, Count>> backingEntries = backingMap.entrySet().iterator();
        return new Iterator<E>() {
          @CheckForNull Map.Entry<E, Count> toRemove;
    
          @Override
          public boolean hasNext() {
            return backingEntries.hasNext();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/AbstractBiMap.java

          return oldValue;
        }
      }
    
      Iterator<Entry<K, V>> entrySetIterator() {
        final Iterator<Entry<K, V>> iterator = delegate.entrySet().iterator();
        return new Iterator<Entry<K, V>>() {
          @CheckForNull Entry<K, V> entry;
    
          @Override
          public boolean hasNext() {
            return iterator.hasNext();
          }
    
          @Override
          public Entry<K, V> next() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Aug 24 01:40:03 UTC 2023
    - 14.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ReverseNaturalOrdering.java

      public <E extends Comparable<?>> E min(E a, E b, E c, E... rest) {
        return NaturalOrdering.INSTANCE.max(a, b, c, rest);
      }
    
      @Override
      public <E extends Comparable<?>> E min(Iterator<E> iterator) {
        return NaturalOrdering.INSTANCE.max(iterator);
      }
    
      @Override
      public <E extends Comparable<?>> E min(Iterable<E> iterable) {
        return NaturalOrdering.INSTANCE.max(iterable);
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun Jun 20 14:22:42 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/TestsForSetsInJavaUtil.java

                      public int size() {
                        return deduped.length;
                      }
    
                      @Override
                      public Iterator<String> iterator() {
                        return MinimalCollection.of(deduped).iterator();
                      }
                    };
                  }
                })
            .named("AbstractSet")
            .withFeatures(
                CollectionFeature.NONE,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java

        public E element() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.element();
        }
    
        @Override
        public Iterator<E> iterator() {
          // We explicitly don't lock for iterator()
          assertFalse(Thread.holdsLock(mutex));
          return delegate.iterator();
        }
    
        @Override
        public int size() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.size();
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 20:50:58 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

      }
    
      public void testIteratorPastEndException() {
        MinMaxPriorityQueue<Integer> mmHeap = MinMaxPriorityQueue.create();
        mmHeap.addAll(Lists.newArrayList(1, 2));
        Iterator<Integer> it = mmHeap.iterator();
        assertTrue("Iterator has reached end prematurely", it.hasNext());
        it.next();
        it.next();
        assertThrows(NoSuchElementException.class, () -> it.next());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/FilteredMultimapValues.java

      FilteredMultimapValues(FilteredMultimap<K, V> multimap) {
        this.multimap = checkNotNull(multimap);
      }
    
      @Override
      public Iterator<V> iterator() {
        return Maps.valueIterator(multimap.entries().iterator());
      }
    
      @Override
      public boolean contains(@CheckForNull Object o) {
        return multimap.containsValue(o);
      }
    
      @Override
      public int size() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top