|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of data in the flowFT
- the type of flow (either Flowpublic interface FlowOperations<T,FT>
Method Summary | ||
---|---|---|
FT |
concat(List<? extends T> list)
Returns a new Flow with the elements in the list appended to this Flow. |
|
int |
count()
Returns the number of values in this flow. |
|
FT |
drop(int length)
Returns a new flow with the first elements omitted. |
|
FT |
each(Worker<? super T> worker)
Applies the worker to each element in the Flow, then returns the flow for further behaviors. |
|
FT |
filter(Predicate<? super T> predicate)
Filters values, keeping only values where the predicate is true, returning a new Flow with just the retained values. |
|
T |
first()
Returns the first element in the Flow. |
|
boolean |
isEmpty()
Returns true if the Flow contains no values. |
|
|
reduce(Reducer<A,T> reducer,
A initial)
Applies a Reducer to the values of the Flow. |
|
FT |
remove(Predicate<? super T> predicate)
Removes values where the predicate returns true, returning a new Flow with just the remaining values. |
|
FT |
removeNulls()
Removes null elements from the flow (null tuples from a ZippedFlow), leaving just the non-null elements. |
|
FT |
rest()
Returns a new Flow containing all but the first element in this flow. |
|
FT |
reverse()
Returns a new flow with the same elements but in reverse order. |
|
FT |
sort(Comparator<T> comparator)
Sorts this flow using the comparator, forming a new flow. |
|
FT |
take(int length)
Returns a new flow containing just the first elements from this Flow. |
|
List<T> |
toList()
Converts the Flow into an unmodifiable list of values. |
|
Set<T> |
toSet()
Converts the Flow into an unmodifiable set of values. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
FT filter(Predicate<? super T> predicate)
FT remove(Predicate<? super T> predicate)
FT each(Worker<? super T> worker)
Each is a non-lazy operation; it will fully realize the values of the Flow.
List<T> toList()
Set<T> toSet()
FT reverse()
boolean isEmpty()
T first()
isEmpty()
to determine if a flow is actually
empty. The first element can be realized without realizing the full Flow.
FT rest()
int count()
Predicate
s).
FT sort(Comparator<T> comparator)
FT take(int length)
length
- maximum number of values in the FlowFT drop(int length)
length
- number of values to dropFT concat(List<? extends T> list)
<A> A reduce(Reducer<A,T> reducer, A initial)
Reducing is a non-lazy operation; it will fully realize the values of the Flow.
FT removeNulls()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |