| Modifier and Type | Method and Description |
|---|---|
| public <V> OrderedIterable | collect(Function<? super T, ? extends V> function)
Redeclares org. Returns a new collection with the results of applying the specified function on each element of the source collection. |
| public OrderedBooleanIterable | collectBoolean(BooleanFunction<? super T> booleanFunction)
Redeclares org. Returns a new primitive |
| public OrderedByteIterable | collectByte(ByteFunction<? super T> byteFunction)
Redeclares org. Returns a new primitive |
| public OrderedCharIterable | collectChar(CharFunction<? super T> charFunction)
Redeclares org. Returns a new primitive |
| public OrderedDoubleIterable | collectDouble(DoubleFunction<? super T> doubleFunction)
Redeclares org. Returns a new primitive |
| public OrderedFloatIterable | collectFloat(FloatFunction<? super T> floatFunction)
Redeclares org. Returns a new primitive |
| public <V> OrderedIterable | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)
Redeclares org. Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate. |
| public OrderedIntIterable | collectInt(IntFunction<? super T> intFunction)
Redeclares org. Returns a new primitive |
| public OrderedLongIterable | collectLong(LongFunction<? super T> longFunction)
Redeclares org. Returns a new primitive |
| public OrderedShortIterable | collectShort(ShortFunction<? super T> shortFunction)
Redeclares org. Returns a new primitive |
| public <P, V> OrderedIterable | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Redeclares org. Same as |
| public default <V> OrderedIterable | collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function)
Returns a new OrderedIterable using results obtained by applying the specified function to each element and its corresponding index. |
| public default <V, R extends Collection | collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index. |
| public <S> boolean | corresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate)
Returns true if both OrderedIterables have the same length
and |
| public int | detectIndex(Predicate<? super T> predicate)
Returns the index of the first element of the |
| public OrderedIterable | Returns: OrderedIterable of distinct elementsReturns a new |
| public OrderedIterable | |
| public <V> OrderedIterable | flatCollect(Function<? super T, ? extends Iterable<V>> function)
Redeclares org.
|
| public default <P, V> OrderedIterable | 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 void | |
| public void | forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
Redeclares org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure e.g.
people.forEachWithIndex((person, index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
|
| public void | forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)
Iterates over the section of the iterable covered by the specified inclusive indexes. |
| public T | getFirst()
Redeclares org. Returns the first element of an iterable. |
| public default Optional | |
| public T | getLast()
Redeclares org. Returns the last element of an iterable. |
| public default Optional | |
| public <V> OrderedIterableMultimap | groupBy(Function<? super T, ? extends V> function)
Redeclares org. For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable. |
| public <V> OrderedIterableMultimap | groupByEach(Function<? super T, ? extends Iterable<V>> function)
Redeclares org. Similar to |
| public default int | |
| public T | max()
Redeclares org. Returns the maximum element out of this container based on the natural order, not the order of this container. |
| public T | min()
Redeclares org. Returns the minimum element out of this container based on the natural order, not the order of this container. |
| public PartitionOrderedIterable | partition(Predicate<? super T> predicate)
Redeclares org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public PartitionOrderedIterable | partitionWhile(Predicate<? super T> predicate)
Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements. |
| public <P> PartitionOrderedIterable | partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Filters a collection into a PartitionIterable based on the evaluation of the predicate. |
| public OrderedIterable | reject(Predicate<? super T> predicate)
Redeclares org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <P> OrderedIterable | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Similar to |
| public default <R extends Collection | rejectWithIndex(ObjectIntPredicate<? super T> predicate, R target)
Adds all elements to the target Collection that return false when evaluating the specified predicate which is supplied each element and its relative index. |
| public OrderedIterable | select(Predicate<? super T> predicate)
Redeclares org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <S> OrderedIterable | selectInstancesOf(Class<S> clazz)
Redeclares org. Returns all elements of the source collection that are instances of the Class |
| public <P> OrderedIterable | selectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Similar to |
| public default <R extends Collection | selectWithIndex(ObjectIntPredicate<? super T> predicate, R target)
Adds all elements to the target Collection that return true when evaluating the specified predicate which is supplied each element and its relative index. |
| public OrderedIterable | |
| public OrderedIterable | tap(Procedure<? super T> procedure)
Redeclares org. Executes the Procedure for each element in the iterable and returns |
| public default MutableStack | |
| public < the type of the second half of the returned pairs S> OrderedIterable | Returns: A newOrderedIterable containing pairs consisting of corresponding elements of this OrderedIterable and that. The length of the returned OrderedIterable is the minimum of the lengths of
this OrderedIterable and that.The that)Iterable providing the second half of each result pairRedeclares org. Returns a |
| public <S, R extends Collection | zip(Iterable<S> that, R target)
Redeclares org. Same as |
| public OrderedIterable | zipWithIndex()
Redeclares org. Zips this |
| public <R extends Collection | zipWithIndex(R target)
Redeclares org. Same as |