| Modifier and Type | Method and Description |
|---|---|
| public LazyIterable | chunk(int size)
Redeclares org. Creates a deferred chunk iterable. |
| public <V> LazyIterable | collect(Function<? super T, ? extends V> function)
Redeclares org. Creates a deferred iterable for collecting elements from the current iterable. |
| public LazyBooleanIterable | collectBoolean(BooleanFunction<? super T> booleanFunction)
Redeclares org. Returns a lazy BooleanIterable which will transform the underlying iterable data to boolean values based on the booleanFunction. |
| public LazyByteIterable | collectByte(ByteFunction<? super T> byteFunction)
Redeclares org. Returns a lazy ByteIterable which will transform the underlying iterable data to byte values based on the byteFunction. |
| public LazyCharIterable | collectChar(CharFunction<? super T> charFunction)
Redeclares org. Returns a lazy CharIterable which will transform the underlying iterable data to char values based on the charFunction. |
| public LazyDoubleIterable | collectDouble(DoubleFunction<? super T> doubleFunction)
Redeclares org. Returns a lazy DoubleIterable which will transform the underlying iterable data to double values based on the doubleFunction. |
| public LazyFloatIterable | collectFloat(FloatFunction<? super T> floatFunction)
Redeclares org. Returns a lazy FloatIterable which will transform the underlying iterable data to float values based on the floatFunction. |
| public <V> LazyIterable | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)
Redeclares org. Creates a deferred iterable for selecting and collecting elements from the current iterable. |
| public LazyIntIterable | collectInt(IntFunction<? super T> intFunction)
Redeclares org. Returns a lazy IntIterable which will transform the underlying iterable data to int values based on the intFunction. |
| public LazyLongIterable | collectLong(LongFunction<? super T> longFunction)
Redeclares org. Returns a lazy LongIterable which will transform the underlying iterable data to long values based on the longFunction. |
| public LazyShortIterable | collectShort(ShortFunction<? super T> shortFunction)
Redeclares org. Returns a lazy ShortIterable which will transform the underlying iterable data to short values based on the shortFunction. |
| public <P, V> LazyIterable | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Redeclares org. Same as |
| public LazyIterable | concatenate(Iterable<T> iterable)
Creates a deferred iterable that will join this iterable with the specified iterable. |
| public LazyIterable | |
| public LazyIterable | drop(int count)
Creates a deferred drop iterable for the current iterable using the specified count as the limit. |
| public LazyIterable | |
| public <V> LazyIterable | flatCollect(Function<? super T, ? extends Iterable<V>> function)
Redeclares org. Creates a deferred flattening iterable for the current iterable. |
| public default <P, V> LazyIterable | flatCollectWith(Function2<? super T, ? super P, ? extends Iterable<V>> function, P parameter)
Overrides default org. Same as flatCollect, only with a Function2 that is passed an extra parameter. |
| public T | getFirst()
Redeclares org. Returns the first element of an iterable. |
| public <R extends Collection | into(R target)
Redeclares org. Iterates over this iterable adding all elements into the target collection. |
| public LazyIterable | reject(Predicate<? super T> predicate)
Redeclares org. Creates a deferred iterable for rejecting elements from the current iterable. |
| public <P> LazyIterable | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Similar to |
| public LazyIterable | select(Predicate<? super T> predicate)
Redeclares org. Creates a deferred iterable for selecting elements from the current iterable. |
| public <S> LazyIterable | selectInstancesOf(Class<S> clazz)
Redeclares org. Returns all elements of the source collection that are instances of the Class |
| public <P> LazyIterable | selectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Similar to |
| public LazyIterable | take(int count)
Creates a deferred take iterable for the current iterable using the specified count as the limit. |
| public LazyIterable | |
| public LazyIterable | tap(Procedure<? super T> procedure)
Redeclares org. Creates a deferred tap iterable. |
| public default Object[] | toArray()
Overrides default org. Converts this iterable to an array. |
| public default <E> E[] | toArray(E[] array)
Overrides default org. Converts this iterable to an array using the specified target array, assuming the target array is as long or longer than the iterable. |
| public default ImmutableBag | toImmutableBag()
Overrides default org. Converts the RichIterable to the default ImmutableBag implementation. |
| public default ImmutableList | toImmutableList()
Overrides default org. Converts the RichIterable to the default ImmutableList implementation. |
| public default ImmutableSet | toImmutableSet()
Overrides default org. Converts the RichIterable to the default ImmutableSet implementation. |
| public <S> LazyIterable | zip(Iterable<S> that)
Redeclares org. Creates a deferred zip iterable. |
| public LazyIterable | zipWithIndex()
Redeclares org. Creates a deferred zipWithIndex iterable. |
| chunk | back to summary |
|---|---|
| public LazyIterable Redeclares org. Creates a deferred chunk iterable.
| |
| collect | back to summary |
|---|---|
| public <V> LazyIterable Redeclares org. Creates a deferred iterable for collecting elements from the current iterable.
| |
| collectBoolean | back to summary |
|---|---|
| public LazyBooleanIterable collectBoolean(BooleanFunction<? super T> booleanFunction) Redeclares org. Returns a lazy BooleanIterable which will transform the underlying iterable data to boolean values based on the booleanFunction.
| |
| collectByte | back to summary |
|---|---|
| public LazyByteIterable collectByte(ByteFunction<? super T> byteFunction) Redeclares org. Returns a lazy ByteIterable which will transform the underlying iterable data to byte values based on the byteFunction.
| |
| collectChar | back to summary |
|---|---|
| public LazyCharIterable collectChar(CharFunction<? super T> charFunction) Redeclares org. Returns a lazy CharIterable which will transform the underlying iterable data to char values based on the charFunction.
| |
| collectDouble | back to summary |
|---|---|
| public LazyDoubleIterable collectDouble(DoubleFunction<? super T> doubleFunction) Redeclares org. Returns a lazy DoubleIterable which will transform the underlying iterable data to double values based on the doubleFunction.
| |
| collectFloat | back to summary |
|---|---|
| public LazyFloatIterable collectFloat(FloatFunction<? super T> floatFunction) Redeclares org. Returns a lazy FloatIterable which will transform the underlying iterable data to float values based on the floatFunction.
| |
| collectIf | back to summary |
|---|---|
| public <V> LazyIterable Redeclares org. Creates a deferred iterable for selecting and collecting elements from the current iterable.
| |
| collectInt | back to summary |
|---|---|
| public LazyIntIterable collectInt(IntFunction<? super T> intFunction) Redeclares org. Returns a lazy IntIterable which will transform the underlying iterable data to int values based on the intFunction.
| |
| collectLong | back to summary |
|---|---|
| public LazyLongIterable collectLong(LongFunction<? super T> longFunction) Redeclares org. Returns a lazy LongIterable which will transform the underlying iterable data to long values based on the longFunction.
| |
| collectShort | back to summary |
|---|---|
| public LazyShortIterable collectShort(ShortFunction<? super T> shortFunction) Redeclares org. Returns a lazy ShortIterable which will transform the underlying iterable data to short values based on the shortFunction.
| |
| collectWith | back to summary |
|---|---|
| public <P, V> LazyIterable Redeclares org. Doc from org. Same as Example using a Java 8 lambda expression:
RichIterable<Integer> integers =
Lists.mutable.with(1, 2, 3).collectWith((each, parameter) -> each + parameter, Integer.valueOf(1));
| |
| concatenate | back to summary |
|---|---|
| public LazyIterable Creates a deferred iterable that will join this iterable with the specified iterable. | |
| distinct | back to summary |
|---|---|
| public LazyIterable Creates a deferred distinct iterable to get distinct elements from the current iterable.
| |
| drop | back to summary |
|---|---|
| public LazyIterable Creates a deferred drop iterable for the current iterable using the specified count as the limit. | |
| dropWhile | back to summary |
|---|---|
public LazyIterable
| |
| flatCollect | back to summary |
|---|---|
| public <V> LazyIterable Redeclares org. Creates a deferred flattening iterable for the current iterable.
| |
| flatCollectWith | back to summary |
|---|---|
| public default <P, V> LazyIterable Overrides default org. Doc from org. Same as flatCollect, only with a Function2 that is passed an extra parameter.
| |
| getFirst | back to summary |
|---|---|
| public T getFirst() Redeclares org. Doc from org. Returns the first element of an iterable. In the case of a List it is the element at the first index. In the case of any other Collection, it is the first element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty. The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the first element could be any element from the Set.
| |
| into | back to summary |
|---|---|
| public <R extends Collection Redeclares org. Iterates over this iterable adding all elements into the target collection.
| |
| reject | back to summary |
|---|---|
| public LazyIterable Redeclares org. Creates a deferred iterable for rejecting elements from the current iterable.
| |
| rejectWith | back to summary |
|---|---|
| public <P> LazyIterable Redeclares org. Doc from org. Similar to
E.g. return a Example using a Java 8 lambda expression:
RichIterable<Person> rejected =
people.rejectWith((Person person, Integer age) -> person.getAge() < age, Integer.valueOf(18));
| |
| select | back to summary |
|---|---|
| public LazyIterable Redeclares org. Creates a deferred iterable for selecting elements from the current iterable.
| |
| selectInstancesOf | back to summary |
|---|---|
| public <S> LazyIterable Redeclares org. Doc from org. Returns all elements of the source collection that are instances of the Class
RichIterable<Integer> integers =
List.mutable.with(new Integer(0), new Long(0L), new Double(0.0)).selectInstancesOf(Integer.class);
| |
| selectWith | back to summary |
|---|---|
| public <P> LazyIterable Redeclares org. Doc from org. Similar to
E.g. return a Example using a Java 8 lambda expression:
RichIterable<Person> selected =
people.selectWith((Person person, Integer age) -> person.getAge()>= age, Integer.valueOf(18));
| |
| take | back to summary |
|---|---|
| public LazyIterable Creates a deferred take iterable for the current iterable using the specified count as the limit. | |
| takeWhile | back to summary |
|---|---|
public LazyIterable
| |
| tap | back to summary |
|---|---|
| public LazyIterable Redeclares org. Creates a deferred tap iterable.
| |
| toArray | back to summary |
|---|---|
| public default Object[] toArray() Overrides default org. Doc from org. Converts this iterable to an array.
| |
| toArray | back to summary |
|---|---|
| public default <E> E[] toArray(E[] array) Overrides default org. Doc from org. Converts this iterable to an array using the specified target array, assuming the target array is as long or longer than the iterable.
| |
| toImmutableBag | back to summary |
|---|---|
| public default ImmutableBag Overrides default org. Doc from org. Converts the RichIterable to the default ImmutableBag implementation.
| |
| toImmutableList | back to summary |
|---|---|
| public default ImmutableList Overrides default org. Doc from org. Converts the RichIterable to the default ImmutableList implementation.
| |
| toImmutableSet | back to summary |
|---|---|
| public default ImmutableSet Overrides default org. Doc from org. Converts the RichIterable to the default ImmutableSet implementation.
| |
| zip | back to summary |
|---|---|
| public <S> LazyIterable Redeclares org. Creates a deferred zip iterable.
| |
| zipWithIndex | back to summary |
|---|---|
| public LazyIterable Redeclares org. Creates a deferred zipWithIndex iterable.
| |