Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 203 for iterable (0.04 sec)

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

     */
    @GwtCompatible
    public final class Iterables {
      private Iterables() {}
    
      /** Returns an unmodifiable view of {@code iterable}. */
      public static <T extends @Nullable Object> Iterable<T> unmodifiableIterable(
          Iterable<? extends T> iterable) {
        checkNotNull(iterable);
        if (iterable instanceof UnmodifiableIterable || iterable instanceof ImmutableCollection) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/Iterables.java

       * this method returns {@code true} if {@code iterable1} and {@code iterable2} contain the same
       * number of elements and every element of {@code iterable1} is equal to the corresponding element
       * of {@code iterable2}.
       */
      public static boolean elementsEqual(Iterable<?> iterable1, Iterable<?> iterable2) {
        if (iterable1 instanceof Collection && iterable2 instanceof Collection) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.3K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/collection/ArrayIterator.java

        /**
         * Returns an {@link Iterable} that wraps the array for use in a for-each statement.
         *
         * @param <T> the type of elements
         * @param items the array of elements to iterate (must not be {@literal null})
         * @return an {@link Iterable} wrapping the array
         */
        public static <T> Iterable<T> iterable(final T... items) {
            assertArgumentNotNull("items", items);
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/lang/ClassIterator.java

        /**
         * Returns an {@link Iterable} that wraps a {@link ClassIterator} for use in a for-each statement.
         *
         * @param clazz the class (must not be {@literal null})
         * @return an {@link Iterable} wrapping a {@link ClassIterator}
         */
        public static Iterable<Class<?>> iterable(final Class<?> clazz) {
            return iterable(clazz, true);
        }
    
        /**
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/io/LineIterator.java

        }
    
        /**
         * Returns an {@link Iterable} that wraps a {@link LineIterator} for use in enhanced for-loops.
         *
         * @param reader
         *            The {@link BufferedReader} to read strings from. Must not be {@literal null}.
         * @return An {@link Iterable} that wraps a {@link LineIterator}.
         */
        public static Iterable<String> iterable(final BufferedReader reader) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/IterablesTest.java

      }
    
      private void testGetOnAbc(Iterable<String> iterable) {
        try {
          Iterables.get(iterable, -1);
          fail();
        } catch (IndexOutOfBoundsException expected) {
        }
        assertEquals("a", Iterables.get(iterable, 0));
        assertEquals("b", Iterables.get(iterable, 1));
        assertEquals("c", Iterables.get(iterable, 2));
        try {
          Iterables.get(iterable, 3);
          fail();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 45.2K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/collection/SingleValueIterator.java

        /**
         * Returns an {@link Iterable} that wraps a {@link SingleValueIterator} for use in a for-each statement.
         *
         * @param <E> the element type
         * @param value the single value returned by the iterator
         * @return an {@link Iterable} wrapping a {@link SingleValueIterator}
         */
        public static <E> Iterable<E> iterable(final E value) {
            return () -> new SingleValueIterator<>(value);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/FluentIterable.java

          Iterable<? extends T> a,
          Iterable<? extends T> b,
          Iterable<? extends T> c,
          Iterable<? extends T> d) {
        return concatNoDefensiveCopy(a, b, c, d);
      }
    
      /**
       * Returns a fluent iterable that combines several iterables. The returned iterable has an
       * iterator that traverses the elements of each iterable in {@code inputs}. The input iterators
       * are not polled until necessary.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/FluentIterable.java

       * already a {@code FluentIterable}.
       *
       * <p><b>{@code Stream} equivalent:</b> {@code iterable.stream()} if {@code iterable} is a {@link
       * Collection}; {@code StreamSupport.stream(iterable.spliterator(), false)} otherwise.
       */
      public static <E extends @Nullable Object> FluentIterable<E> from(Iterable<E> iterable) {
        return (iterable instanceof FluentIterable)
            ? (FluentIterable<E>) iterable
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSet.java

          default:
            return create(elements);
        }
      }
    
      public static <E> ImmutableSet<E> copyOf(Collection<? extends E> elements) {
        Iterable<? extends E> iterable = elements;
        return copyOf(iterable);
      }
    
      public static <E> ImmutableSet<E> copyOf(Iterable<? extends E> elements) {
        if (elements instanceof ImmutableSet && !(elements instanceof ImmutableSortedSet)) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 8.3K bytes
    - Viewed (0)
Back to top