Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 914 for iterate (0.1 sec)

  1. android/guava/src/com/google/common/collect/Streams.java

          zip(streamA, streamB, TemporaryPair::new).forEach(pair -> consumer.accept(pair.a, pair.b));
        } else {
          Iterator<A> iterA = streamA.iterator();
          Iterator<B> iterB = streamB.iterator();
          while (iterA.hasNext() && iterB.hasNext()) {
            consumer.accept(iterA.next(), iterB.next());
          }
        }
      }
    
      // Use this carefully - it doesn't implement value semantics
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/TopKSelector.java

     * create the {@code TopKSelector} instance.
     *
     * <p>If your input data is available as an {@link Iterable} or {@link Iterator}, prefer {@link
     * Ordering#leastOf(Iterable, int)}, which provides the same implementation with an interface
     * tailored to that use case.
     *
     * <p>This uses the same efficient implementation as {@link Ordering#leastOf(Iterable, int)},
     * offering expected O(n + k log k) performance (worst case O(n log k)) for n calls to {@link
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/PredicatesTest.java

        final List<Predicate<Object>> list = newArrayList();
        Iterable<Predicate<Object>> iterable =
            new Iterable<Predicate<Object>>() {
              @Override
              public Iterator<Predicate<Object>> iterator() {
                return list.iterator();
              }
            };
        Predicate<Object> predicate = Predicates.and(iterable);
        assertTrue(predicate.apply(1));
        list.add(Predicates.alwaysFalse());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 32.4K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableRangeSet.java

          }
          return result.intValue();
        }
    
        @Override
        public UnmodifiableIterator<C> iterator() {
          return new AbstractIterator<C>() {
            final Iterator<Range<C>> rangeItr = ranges.iterator();
            Iterator<C> elemItr = emptyIterator();
    
            @Override
            @CheckForNull
            protected C computeNext() {
              while (!elemItr.hasNext()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

       * half of that is more awkward to arrange...
       */
      private static <T> Iterable<T> iterable(final Collection<T> collection) {
        // return collection::iterator;
        return new Iterable<T>() {
          @Override
          public Iterator<T> iterator() {
            return collection.iterator();
          }
        };
      }
    
      public void testEquals() {
        new EqualsTester()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

       * half of that is more awkward to arrange...
       */
      private static <T> Iterable<T> iterable(final Collection<T> collection) {
        // return collection::iterator;
        return new Iterable<T>() {
          @Override
          public Iterator<T> iterator() {
            return collection.iterator();
          }
        };
      }
    
      public void testEquals() {
        new EqualsTester()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/AbstractMultimap.java

        return get(key).add(value);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean putAll(@ParametricNullness K key, Iterable<? extends V> values) {
        checkNotNull(values);
        // make sure we only call values.iterator() once
        // and we only call get(key) if values is nonempty
        if (values instanceof Collection) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 21:08:00 UTC 2021
    - 7.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

      }
    
      public void testCopyOf_iterator_general() {
        Iterator<String> iterator = asList("a", "b", "a").iterator();
        Multiset<String> multiset = ImmutableSortedMultiset.copyOf(iterator);
        assertEquals(HashMultiset.create(asList("a", "b", "a")), multiset);
      }
    
      public void testCopyOf_iteratorContainingNull() {
        Iterator<String> iterator = asList("a", null, "b").iterator();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/TreeRangeMap.java

      }
    
      private final class AsMapOfRanges extends IteratorBasedAbstractMap<Range<K>, V> {
    
        final Iterable<Entry<Range<K>, V>> entryIterable;
    
        @SuppressWarnings("unchecked") // it's safe to upcast iterables
        AsMapOfRanges(Iterable<RangeMapEntry<K, V>> entryIterable) {
          this.entryIterable = (Iterable) entryIterable;
        }
    
        @Override
        public boolean containsKey(@CheckForNull Object key) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/ByteSource.java

       *
       * <p>Note: The input {@code Iterator} will be copied to an {@code ImmutableList} when this method
       * is called. This will fail if the iterator is infinite and may cause problems if the iterator
       * eagerly fetches data for each source when iterated (rather than producing sources that only
       * load data through their streams). Prefer using the {@link #concat(Iterable)} overload if
       * possible.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 26.2K bytes
    - Viewed (0)
Back to top