| Package | Description |
|---|---|
| io.atlassian.fugue | |
| io.atlassian.fugue.law |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Monoid<A>
A Monoid is an algebraic structure consisting of an associative binary
operation across the values of a given type (a monoid is a
Semigroup)
and an identity element for this operation. |
| Modifier and Type | Field and Description |
|---|---|
static Semigroup<BigDecimal> |
Semigroups.bigDecimalMaximum
A semigroup that yields the maximum of big decimals.
|
static Semigroup<BigDecimal> |
Semigroups.bigDecimalMinimum
A semigroup that yields the minimum of big decimals.
|
static Semigroup<BigInteger> |
Semigroups.bigintMaximum
A semigroup that yields the maximum of big integers.
|
static Semigroup<BigInteger> |
Semigroups.bigintMinimum
A semigroup that yields the minimum of big integers.
|
static Semigroup<Integer> |
Semigroups.intMaximum
A semigroup that yields the maximum of integers.
|
static Semigroup<Integer> |
Semigroups.intMinimum
A semigroup that yields the minimum of integers.
|
static Semigroup<Long> |
Semigroups.longMaximum
A semigroup that yields the maximum of longs.
|
static Semigroup<Long> |
Semigroups.longMinimum
A semigroup that yields the minimum of longs.
|
| Modifier and Type | Method and Description |
|---|---|
static <A,B> Semigroup<Pair<A,B>> |
Semigroup.compose(Semigroup<A> sa,
Semigroup<B> sb)
Composes a semigroup with another.
|
static <A> Semigroup<A> |
Semigroup.dual(Semigroup<A> semigroup)
Return the dual Semigroup of a semigroup
|
static <L,R> Semigroup<Either<L,R>> |
Semigroups.either(Semigroup<L> lS,
Semigroup<R> rS)
Sums up values inside either, if both are left or right.
|
static <A> Semigroup<A> |
Semigroups.first()
Return the first value, ignore the second
|
static <A,B> Semigroup<Function<A,B>> |
Semigroups.function(Semigroup<B> sb)
A semigroup for functions.
|
static <A> Semigroup<A> |
Semigroups.last()
Return the last value, ignore the first
|
static <A extends Comparable<A>> |
Semigroups.max()
A semigroup that yields the maximum of comparable values.
|
static <A> Semigroup<A> |
Semigroups.max(Comparator<A> comparator)
A semigroup that yields the maximum of by a comparator.
|
static <A extends Comparable<A>> |
Semigroups.min()
A semigroup that yields the minimum of comparable values.
|
static <A> Semigroup<A> |
Semigroups.min(Comparator<A> comparator)
A semigroup that yields the minimum of by a comparator.
|
| Modifier and Type | Method and Description |
|---|---|
static <A,B> Semigroup<Pair<A,B>> |
Semigroup.compose(Semigroup<A> sa,
Semigroup<B> sb)
Composes a semigroup with another.
|
static <A,B> Semigroup<Pair<A,B>> |
Semigroup.compose(Semigroup<A> sa,
Semigroup<B> sb)
Composes a semigroup with another.
|
static <A> Semigroup<A> |
Semigroup.dual(Semigroup<A> semigroup)
Return the dual Semigroup of a semigroup
|
static <L,R> Monoid<Either<L,R>> |
Monoids.either(Semigroup<L> lS,
Monoid<R> rM)
A monoid Sums up values inside either
Semigroups.either(io.atlassian.fugue.Semigroup<L>, io.atlassian.fugue.Semigroup<R>). |
static <L,R> Semigroup<Either<L,R>> |
Semigroups.either(Semigroup<L> lS,
Semigroup<R> rS)
Sums up values inside either, if both are left or right.
|
static <L,R> Semigroup<Either<L,R>> |
Semigroups.either(Semigroup<L> lS,
Semigroup<R> rS)
Sums up values inside either, if both are left or right.
|
static <A,B> Semigroup<Function<A,B>> |
Semigroups.function(Semigroup<B> sb)
A semigroup for functions.
|
static <A> Monoid<Option<A>> |
Monoids.option(Semigroup<A> semigroup)
A monoid for options that combine inner value with a semigroup.
|
| Constructor and Description |
|---|
SemigroupLaws(Semigroup<A> semigroup)
Build a law instance to check semigroup properties
|
Copyright © 2018 Atlassian. All rights reserved.