Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 388 for iterable (0.42 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. android/guava-testlib/src/com/google/common/collect/testing/MinimalIterable.java

    public final class MinimalIterable<E extends @Nullable Object> implements Iterable<E> {
      /** Returns an iterable whose iterator returns the given elements in order. */
      public static <E extends @Nullable Object> MinimalIterable<E> of(E... elements) {
        // Make sure to get an unmodifiable iterator
        return new MinimalIterable<>(asList(elements).iterator());
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java

        multimap().putAll(k0(), Collections.<V>emptyList());
        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      public void testPutAllOnlyCallsIteratorOnce() {
        Iterable<V> iterable =
            new Iterable<V>() {
              private boolean calledIteratorAlready = false;
    
              @Override
              public Iterator<V> iterator() {
                checkState(!calledIteratorAlready);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/graph/TraverserTest.java

        Iterable<Character> result = Traverser.forGraph(graph).breadthFirst(charactersOf("ab"));
    
        assertEqualCharNodes(Iterables.limit(result, 2), "ab");
        assertThat(graph.requestedNodes).containsExactly('a', 'a', 'b', 'b');
    
        // Iterate again to see if calculation is done again
        assertEqualCharNodes(Iterables.limit(result, 2), "ab");
        assertThat(graph.requestedNodes).containsExactly('a', 'a', 'a', 'b', 'b', 'b');
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 47.5K bytes
    - Viewed (0)
Back to top