public static final class FastStream.Sorted<T> extends java.lang.Object implements FastStream<T>
FastStream sorted by a comparator.FastStream.Bucket<V>, FastStream.Concatenated<T>, FastStream.ConcatenatedN<T>, FastStream.Distinct<T>, FastStream.Filtered<T>, FastStream.FlatMapped<T,R>, FastStream.Group<K,V>, FastStream.Grouped<T,K,V>, FastStream.Internal, FastStream.Mapped<T,R>, FastStream.OfN<T>, FastStream.OfSingle<T>, FastStream.Partitioned<V>, FastStream.Peeked<T>, FastStream.Reversed<T>, FastStream.Sliced<T>, FastStream.Sorted<T>, FastStream.TypeCheck<T,S>, FastStream.Wrapped<T>, FastStream.WrappedSpl<T>EMPTY| Modifier and Type | Method and Description |
|---|---|
void |
forEach(java.util.function.Consumer<? super T> action) |
java.util.Iterator<T> |
iterator() |
int |
knownLength(boolean consumeToCalculate)
Returns the known length for the stream.
|
T[] |
toArray(T[] arr)
Collects the stream into a
T[]. |
com.google.common.collect.ImmutableList<T> |
toImmutableList()
Collects this stream into a
ImmutableList. |
java.util.ArrayList<T> |
toList()
Collects this stream into an
ArrayList. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallMatch, anyMatch, concat, concat, concatMany, count, distinct, doubleSum, empty, filter, filterNot, findFirst, findLast, first, firstOrDefault, firstOrDefault, flatMap, fold, fold, groupBy, groupBy, infer, intSum, isEmpty, join, knownLength, last, lastOrDefault, lastOrDefault, limit, longSum, map, maxBy, maxByDouble, maxByDoubleOrDefault, maxByDoubleOrDefault, maxByLong, maxByLongOrDefault, maxByLongOrDefault, maxByOrDefault, maxByOrDefault, minBy, minByDouble, minByDoubleOrDefault, minByDoubleOrDefault, minByLong, minByLongOrDefault, minByLongOrDefault, minByOrDefault, minByOrDefault, noneMatch, of, of, of, of, of, of, of, ofNullable, only, onlyOrDefault, onlyOrDefault, partition, peek, reversed, skip, sorted, sorted, toArray, toArray, toImmutableList, toImmutableMap, toImmutableMap, toImmutableSet, toImmutableSet, toLinkedHashMap, toLinkedHashMap, toLinkedHashSet, toLinkedHashSet, toLinkedList, toLinkedList, toList, toMap, toMap, toMap, toMap, toSet, toSetpublic java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>public void forEach(java.util.function.Consumer<? super T> action)
forEach in interface java.lang.Iterable<T>public int knownLength(boolean consumeToCalculate)
FastStream
If true is specified to consumeToCalculate causes
operations which would not normally know their length prior to a
terminal operation being applied, to cache their result under the assumption
that the stream is about to be fully consumed.
knownLength in interface FastStream<T>consumeToCalculate - If the caller intends to consume the entire stream via Iterable.forEach(java.util.function.Consumer<? super T>) after calling.public T[] toArray(T[] arr)
FastStreamT[].toArray in interface FastStream<T>arr - The template array to use. If the array is large enough
to fit all elements in the stream, this will be used with
a single null element after the last element.T[].public java.util.ArrayList<T> toList()
FastStreamArrayList.toList in interface FastStream<T>ArrayList.public com.google.common.collect.ImmutableList<T> toImmutableList()
FastStreamImmutableList.toImmutableList in interface FastStream<T>ImmutableList.