Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for iterable (2.33 sec)

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

       *
       * @param iterable the iterable to copy
       * @return a newly-allocated array into which all the elements of the iterable have been copied
       */
      static @Nullable Object[] toArray(Iterable<?> iterable) {
        return castOrCopyToCollection(iterable).toArray();
      }
    
      /**
       * Converts an iterable into a collection. If the iterable is already a collection, it is
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Ordering.java

      // Ordering<Iterable<String>> o =
      //     Ordering.<String>natural().lexicographical();
      public <S extends T> Ordering<Iterable<S>> lexicographical() {
        /*
         * Note that technically the returned ordering should be capable of
         * handling not just {@code Iterable<S>} instances, but also any {@code
         * Iterable<? extends S>}. However, the need for this comes up so rarely
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterable<String> iterable = asList("a", "b");
        Iterator<String> cycle = Iterators.cycle(iterable);
        cycle.next();
        try {
          cycle.remove();
          fail("no exception thrown");
        } catch (UnsupportedOperationException expected) {
        }
      }
    
      public void testCycleRemoveAfterHasNext() {
        Iterable<String> iterable = Lists.newArrayList("a");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 56.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Comparators.java

       * always true when the iterable has fewer than two elements.
       */
      public static <T extends @Nullable Object> boolean isInOrder(
          Iterable<? extends T> iterable, Comparator<T> comparator) {
        checkNotNull(comparator);
        Iterator<? extends T> it = iterable.iterator();
        if (it.hasNext()) {
          T prev = it.next();
          while (it.hasNext()) {
            T next = it.next();
            if (comparator.compare(prev, next) > 0) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Iterators.java

       * Returns an iterator that cycles indefinitely over the elements of {@code iterable}.
       *
       * <p>The returned iterator supports {@code remove()} if the provided iterator does. After {@code
       * remove()} is called, subsequent cycles omit the removed element, which is no longer in {@code
       * iterable}. The iterator's {@code hasNext()} method returns {@code true} until {@code iterable}
       * is empty.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Sets.java

       * accepts non-{@code Collection} iterables and empty iterables.
       */
      public static <E extends Enum<E>> EnumSet<E> newEnumSet(
          Iterable<E> iterable, Class<E> elementType) {
        EnumSet<E> set = EnumSet.noneOf(elementType);
        Iterables.addAll(set, iterable);
        return set;
      }
    
      // HashSet
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ListsTest.java

      private static final Iterable<Integer> SOME_ITERABLE = new SomeIterable();
    
      private static final class RemoveFirstFunction implements Function<String, String>, Serializable {
        @Override
        public String apply(String from) {
          return (from.length() == 0) ? from : from.substring(1);
        }
      }
    
      private static class SomeIterable implements Iterable<Integer>, Serializable {
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ListsTest.java

      private static final Iterable<Integer> SOME_ITERABLE = new SomeIterable();
    
      private static final class RemoveFirstFunction implements Function<String, String>, Serializable {
        @Override
        public String apply(String from) {
          return (from.length() == 0) ? from : from.substring(1);
        }
      }
    
      private static class SomeIterable implements Iterable<Integer>, Serializable {
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

       * will be merged.
       *
       * @throws IllegalArgumentException if any ranges overlap or are empty
       * @since 21.0
       */
      public static <C extends Comparable<?>> ImmutableRangeSet<C> copyOf(Iterable<Range<C>> ranges) {
        return new ImmutableRangeSet.Builder<C>().addAll(ranges).build();
      }
    
      /**
       * Returns an {@code ImmutableRangeSet} representing the union of the specified ranges.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableList.java

         *
         * @param elements the {@code Iterable} to add to the {@code ImmutableList}
         * @return this {@code Builder} object
         * @throws NullPointerException if {@code elements} is null or contains a null element
         */
        @CanIgnoreReturnValue
        @Override
        public Builder<E> addAll(Iterable<? extends E> elements) {
          super.addAll(elements);
          return this;
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.1K bytes
    - Viewed (0)
Back to top