Uses of Class
fj.Semigroup
Packages that use Semigroup
Package
Description
Types that set the premise for the existence of Functional Java.
Common algebraic data types.
Optic data types adapted from the Scala Monocle library
and inspired by the
Haskell Lens library.
Parser combinators.
-
Uses of Semigroup in fj
Modifier and TypeFieldDescriptionstatic final Semigroup
<BigDecimal> Semigroup.bigdecimalAdditionSemigroup
A semigroup that adds big decimals.static final Semigroup
<BigDecimal> Semigroup.bigDecimalMaximumSemigroup
A semigroup that yields the maximum of big decimals.static final Semigroup
<BigDecimal> Semigroup.bigDecimalMinimumSemigroup
A semigroup that yields the minimum of big decimals.static final Semigroup
<BigDecimal> Semigroup.bigdecimalMultiplicationSemigroup
A semigroup that multiplies big decimals.static final Semigroup
<BigInteger> Semigroup.bigintAdditionSemigroup
A semigroup that adds big integers.static final Semigroup
<BigInteger> Semigroup.bigintMaximumSemigroup
A semigroup that yields the maximum of big integers.static final Semigroup
<BigInteger> Semigroup.bigintMinimumSemigroup
A semigroup that yields the minimum of big integers.static final Semigroup
<BigInteger> Semigroup.bigintMultiplicationSemigroup
A semigroup that multiplies big integers.Semigroup.conjunctionSemigroup
A semigroup that ANDs booleans.Semigroup.disjunctionSemigroup
A semigroup that ORs booleans.Semigroup.exclusiveDisjunctionSemiGroup
A semigroup that XORs booleans.Semigroup.intAdditionSemigroup
A semigroup that adds integers.Semigroup.intMaximumSemigroup
A semigroup that yields the maximum of integers.Semigroup.intMinimumSemigroup
A semigroup that yields the minimum of integers.Semigroup.intMultiplicationSemigroup
A semigroup that multiplies integers.Semigroup.longAdditionSemigroup
A semigroup that adds longs.Semigroup.longMaximumSemigroup
A semigroup that yields the maximum of longs.Semigroup.longMinimumSemigroup
A semigroup that yields the minimum of longs.Semigroup.longMultiplicationSemigroup
A semigroup that multiplies longs.Semigroup.naturalAdditionSemigroup
A semigroup that adds natural numbers.Semigroup.naturalMaximumSemigroup
A semigroup that yields the maximum of natural numbers.Semigroup.naturalMinimumSemigroup
A semigroup that yields the minimum of natural numbers.Semigroup.naturalMultiplicationSemigroup
A semigroup that multiplies natural numbers.static final Semigroup
<StringBuffer> Semigroup.stringBufferSemigroup
A semigroup that appends string buffers.static final Semigroup
<StringBuilder> Semigroup.stringBuilderSemigroup
A semigroup that appends string builders.Semigroup.stringSemigroup
A semigroup that appends strings.Semigroup.unitSemigroup
A semigroup for the Unit value.Modifier and TypeMethodDescriptionSemigroup.arraySemigroup()
A semigroup for arrays.<B,
C> Semigroup <C> Semigroup.dual()
Swaps the arguments when summing.Semigroup.firstOptionSemigroup()
A semigroup for optional values that take the first available value.static <A> Semigroup
<A> Semigroup.firstSemigroup()
A semigroup which always uses the "first" (left-hand side) value.Semigroup.functionSemigroup
(Semigroup<B> sb) A semigroup for functions.Semigroup.ioSemigroup
(Semigroup<A> sa) A semigroup for IO values.Semigroup.lastOptionSemigroup()
A semigroup for optional values that take the last available value.static <A> Semigroup
<A> Semigroup.lastSemigroup()
A semigroup which always uses the "last" (right-hand side) value.Semigroup.listSemigroup()
A semigroup for lists.Ord.maxSemigroup()
Ord.minSemigroup()
static <A> Semigroup
<NonEmptyList<A>> Semigroup.nonEmptyListSemigroup()
A semigroup for non-empty lists.Semigroup.p1Semigroup
(Semigroup<A> sa) A lazy semigroup for unary products.Semigroup.p2Semigroup
(Semigroup<A> sa, Semigroup<B> sb) A lazy semigroup for binary products.Monoid.semigroup()
Returns a semigroup projection of this monoid.static <A> Semigroup
<A> Constructs a semigroup from the given function.static <A> Semigroup
<A> Constructs a semigroup from the given function.static <A> Semigroup
<A> Semigroup.semigroupDef
(Semigroup.AltDefinition<A> def) Constructs a semigroup from the given definition.static <A> Semigroup
<A> Semigroup.semigroupDef
(Semigroup.Definition<A> def) Constructs a semigroup from the given definition.Semigroup.setIntersectionSemigroup()
A intersection semigroup for sets.Semigroup.setSemigroup()
A union semigroup for sets.Semigroup.streamSemigroup()
A semigroup for streams.<B> Semigroup
<B> Maps the given functions across this monoid as an invariant functor.Modifier and TypeMethodDescription<B,
C> Semigroup <C> Semigroup.functionSemigroup
(Semigroup<B> sb) A semigroup for functions.Semigroup.ioSemigroup
(Semigroup<A> sa) A semigroup for IO values.Monoid.optionMonoid
(Semigroup<A> aSemigroup) Lift aSemigroup<A>
for A to aMonoid<Option<A>>
, using Option.none() as zero.Semigroup.p1Semigroup
(Semigroup<A> sa) A lazy semigroup for unary products.Semigroup.p2Semigroup
(Semigroup<A> sa, Semigroup<B> sb) A lazy semigroup for binary products. -
Uses of Semigroup in fj.data
Modifier and TypeMethodDescriptionfinal <A> Validation
<E, A> Validation.accumapply
(Semigroup<E> s, Validation<E, F<T, A>> v) Function application on the successful side of this validation, or accumulating the errors on the failing side using the given semigroup should one or more be encountered.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, Validation<E, F$> vf) Accumulates errors anonymously.Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, Validation<E, F$> vf, Validation<E, G> vg) Accumulates errors anonymously.final <A,
B, C, D, E$, F$, G, H>
Validation<E, H> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, Validation<E, F$> vf, Validation<E, G> vg, F<T, F<A, F<B, F<C, F<D, F<E$, F<F$, F<G, H>>>>>>>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$, F$, G, H>
Validation<E, H> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, Validation<E, F$> vf, Validation<E, G> vg, F8<T, A, B, C, D, E$, F$, G, H> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$, F$, G>
Validation<E, G> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, Validation<E, F$> vf, F<T, F<A, F<B, F<C, F<D, F<E$, F<F$, G>>>>>>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$, F$, G>
Validation<E, G> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, Validation<E, F$> vf, F7<T, A, B, C, D, E$, F$, G> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$, F$>
Validation<E, F$> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, F<T, F<A, F<B, F<C, F<D, F<E$, F$>>>>>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$, F$>
Validation<E, F$> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, Validation<E, E$> ve, F6<T, A, B, C, D, E$, F$> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$>
Validation<E, E$> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, F<T, F<A, F<B, F<C, F<D, E$>>>>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D, E$>
Validation<E, E$> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, Validation<E, D> vd, F5<T, A, B, C, D, E$> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D>
Validation<E, D> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, F<T, F<A, F<B, F<C, D>>>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C, D>
Validation<E, D> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, Validation<E, C> vc, F4<T, A, B, C, D> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C> Validation <E, C> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, F<T, F<A, F<B, C>>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B, C> Validation <E, C> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, Validation<E, B> vb, F3<T, A, B, C> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B> Validation <E, B> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, F<T, F<A, B>> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.final <A,
B> Validation <E, B> Validation.accumulate
(Semigroup<E> s, Validation<E, A> va, F2<T, A, B> f) Accumulates errors on the failing side of this or any given validation if one or more are encountered, or applies the given function if all succeeded and returns that value on the successful side.static <E,
A> Validation <E, List<A>> Validation.sequence
(Semigroup<E> s, List<Validation<E, A>> list) If list contains a failure, returns a failure of the reduction of all the failures using the semigroup, otherwise returns the successful list.static final <E,
B> Validation <E, List<B>> List.sequenceValidation
(Semigroup<E> semigroup, List<Validation<E, B>> list) Sequence the given list and collect the output as a validation; use the given semigroup to reduce the errors.static <E,
B> Validation <E, Seq<B>> Seq.sequenceValidation
(Semigroup<E> semigroup, Seq<Validation<E, B>> seq) Sequence the given seq and collect the output as a validation; use the given semigroup to reduce the errors.static <E,
B> Validation <E, Stream<B>> Stream.sequenceValidation
(Semigroup<E> semigroup, Stream<Validation<E, B>> stream) Sequence the given stream and collect the output as a validation; use the given semigroup to reduce the errors.final <E,
B> Validation <E, List<B>> List.traverseValidation
(Semigroup<E> s, F<A, Validation<E, B>> f) Traverse this list with the given function and collect the output as a validation; use the given semigroup to reduce the errors.<E,
B> Validation <E, Seq<B>> Seq.traverseValidation
(Semigroup<E> semigroup, F<A, Validation<E, B>> f) Traverse this seq with the given function and collect the output as a validation; use the given semigroup to reduce the errors.final <E,
B> Validation <E, Stream<B>> Stream.traverseValidation
(Semigroup<E> semigroup, F<A, Validation<E, B>> f) Traverse this stream with the given function and collect the output as a validation; use the given semigroup to reduce the errors. -
Uses of Semigroup in fj.data.optic
Methods in fj.data.optic with parameters of type SemigroupModifier and TypeMethodDescriptionabstract <E> F
<S, Validation<E, T>> PTraversal.modifyValidationF
(Semigroup<E> s, F<A, Validation<E, B>> f) modify polymorphically the target of aPTraversal
with an Applicative function<E> F
<S, Validation<E, S>> Traversal.modifyValidationF
(Semigroup<E> s, F<A, Validation<E, A>> f) -
Uses of Semigroup in fj.parser
Modifier and TypeMethodDescriptionReturns a parser that tries this parser and if it fails, then tries the given parser.Returns a parser that tries this parser and if it fails, then tries the given parser.