Package fj.data.optic
Class Fold<S,A>
java.lang.Object
fj.data.optic.Fold<S,A>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheck if all targets satisfy the predicatecomposeFold
(Fold<A, B> other) composeGetter
(Getter<A, C> other) composeIso
(PIso<A, B, C, D> other) composeLens
(PLens<A, B, C, D> other) composeOptional
(POptional<A, B, C, D> other) composePrism
(PPrism<A, B, C, D> other) check if at least one target satisfies the predicatefind the first target of aFold
matching the predicatecombine all targets using a target'sMonoid
get all the targets of aFold
TODO: Shall it return a Stream as there might be an infinite number of targets?headOption
(S s) get the first target of aFold
static <A> Fold
<A, A> id()
join twoFold
with the same target
-
Constructor Details
-
Fold
public Fold()
-
-
Method Details
-
foldMap
-
fold
combine all targets using a target'sMonoid
-
getAll
get all the targets of aFold
TODO: Shall it return a Stream as there might be an infinite number of targets? -
find
find the first target of aFold
matching the predicate -
headOption
get the first target of aFold
-
exist
check if at least one target satisfies the predicate -
all
check if all targets satisfy the predicate -
sum
join twoFold
with the same target -
composeFold
-
composeGetter
-
composeOptional
-
composePrism
-
composeLens
-
composeIso
-
id
-
codiagonal
-