Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 914 for iterate (0.05 sec)

  1. src/main/java/org/codelibs/core/collection/ArrayIterator.java

    import java.util.Iterator;
    import java.util.NoSuchElementException;
    
    import org.codelibs.core.exception.ClUnsupportedOperationException;
    
    /**
     * 配列を{@link Iterator}にするAdaptorです。
     * <p>
     * 次のように使います.
     * </p>
     *
     * <pre>
     * import static org.codelibs.core.collection.ArrayIterator.*;
     *
     * String[] array = ...;
     * for (String element : iterable(array)) {
     *     ...
     * }
     * </pre>
     *
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/collection/SingleValueIterator.java

        /**
         * for each構文で使用するために{@link SingleValueIterator}をラップした{@link Iterable}を返します。
         *
         * @param <E>
         *            要素の型
         * @param value
         *            反復子が返す唯一の値
         * @return {@link SingleValueIterator}をラップした{@link Iterable}
         */
        public static <E> Iterable<E> iterable(final E value) {
            return () -> new SingleValueIterator<>(value);
        }
    
        /**
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Ordering.java

       * @throws ClassCastException if the parameters are not <i>mutually comparable</i> under this
       *     ordering.
       * @since 11.0
       */
      @ParametricNullness
      public <E extends T> E min(Iterator<E> iterator) {
        // let this throw NoSuchElementException as necessary
        E minSoFar = iterator.next();
    
        while (iterator.hasNext()) {
          minSoFar = this.<E>min(minSoFar, iterator.next());
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableMultimap.java

       * over keys in the order they were first encountered in the input, and the values for each key
       * are iterated in the order they were encountered.
       *
       * @throws NullPointerException if any key, value, or entry is null
       * @since 19.0
       */
      public static <K, V> ImmutableMultimap<K, V> copyOf(
          Iterable<? extends Entry<? extends K, ? extends V>> entries) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

        /* nothing */
      }
    
      /**
       * This Iterator claims to have more elements than the underlying iterable, but when you try to
       * fetch the extra elements, it throws an unchecked exception.
       */
      static class ThrowsAtEndIterator<E> implements Iterator<E> {
        Iterator<E> iterator;
    
        public ThrowsAtEndIterator(Iterable<E> iterable) {
          this.iterator = iterable.iterator();
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableSortedSet.java

            size(), SPLITERATOR_CHARACTERISTICS | Spliterator.SIZED) {
          final UnmodifiableIterator<E> iterator = iterator();
    
          @Override
          public boolean tryAdvance(Consumer<? super E> action) {
            if (iterator.hasNext()) {
              action.accept(iterator.next());
              return true;
            } else {
              return false;
            }
          }
    
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        Iterator<String> iterator = asList("a", "b", "a").iterator();
        Multiset<String> multiset = ImmutableMultiset.copyOf(iterator);
        assertEquals(HashMultiset.create(asList("a", "b", "a")), multiset);
      }
    
      public void testCopyOf_iteratorContainingNull() {
        Iterator<@Nullable String> iterator =
            Arrays.<@Nullable String>asList("a", null, "b").iterator();
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

        Iterator<String> iterator = asList("a", "b", "a").iterator();
        List<String> list = ImmutableList.copyOf(iterator);
        assertEquals(asList("a", "b", "a"), list);
      }
    
      public void testCopyOf_iteratorContainingNull() {
        Iterator<@Nullable String> iterator =
            Arrays.<@Nullable String>asList("a", null, "b").iterator();
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/lang/ClassLoaderIterator.java

     * for (ClassLoader loader : iterable(classLoader)) {
     *     ...
     * }
     * </pre>
     *
     * @author koichik
     */
    public class ClassLoaderIterator implements Iterator<ClassLoader> {
    
        /** クラスローダ */
        protected ClassLoader classLoader;
    
        /**
         * for each構文で使用するために{@link ClassLoaderIterator}をラップした{@link Iterable}を返します。
         *
         * @param classLoader
         *            クラスローダ。{@literal null}であってはいけません
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/MinMaxPriorityQueue.java

            lastFromForgetMeNot = null;
          }
        }
    
        /** Returns true if an exact reference (==) was found and removed from the supplied iterable. */
        private boolean foundAndRemovedExactReference(Iterable<E> elements, E target) {
          for (Iterator<E> it = elements.iterator(); it.hasNext(); ) {
            E element = it.next();
            if (element == target) {
              it.remove();
              return true;
            }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
Back to top