Package com.ssgllc.fish.f.list
Class ValueReducer<U,V>
java.lang.Object
com.ssgllc.fish.f.list.ValueReducer<U,V>
A fold awaiting its initial value, produced by
ListBuilder.reduce(java.util.List).
A null list is treated as empty, so a fold over an absent collection yields the initial value rather than failing.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstartingWith(V initialValue) Supplies the fold's initial value.
-
Constructor Details
-
ValueReducer
-
-
Method Details
-
startingWith
Supplies the fold's initial value.Returns a single-element list rather than the reducer itself, so a SpEL projection can be used to step into it - which is how the chain continues without a statement.
- Parameters:
initialValue- the value the fold starts from- Returns:
- a one-element list holding the reducer
-