Package org.reactfx.util
Class Right<L,R>
- java.lang.Object
-
- org.reactfx.util.Right<L,R>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<L>asLeft()java.util.Optional<R>asRight()booleanequals(java.lang.Object other)voidexec(java.util.function.Consumer<? super L> ifLeft, java.util.function.Consumer<? super R> ifRight)<L2,R2>
Either<L2,R2>flatMap(java.util.function.Function<? super L,Either<L2,R2>> f, java.util.function.Function<? super R,Either<L2,R2>> g)<L2> Either<L2,R>flatMapLeft(java.util.function.Function<? super L,Either<L2,R>> f)<R2> Either<L,R2>flatMapRight(java.util.function.Function<? super R,Either<L,R2>> f)LgetLeft()RgetRight()inthashCode()voidifLeft(java.util.function.Consumer<? super L> f)voidifRight(java.util.function.Consumer<? super R> f)booleanisLeft()booleanisRight()<L2,R2>
Either<L2,R2>map(java.util.function.Function<? super L,? extends L2> f, java.util.function.Function<? super R,? extends R2> g)<L2> Either<L2,R>mapLeft(java.util.function.Function<? super L,? extends L2> f)<R2> Either<L,R2>mapRight(java.util.function.Function<? super R,? extends R2> f)LtoLeft(java.util.function.Function<? super R,? extends L> f)RtoRight(java.util.function.Function<? super L,? extends R> f)java.lang.StringtoString()<T> Tunify(java.util.function.Function<? super L,? extends T> f, java.util.function.Function<? super R,? extends T> g)
-
-
-
Field Detail
-
value
private final R value
-
-
Constructor Detail
-
Right
public Right(R value)
-
-
Method Detail
-
ifLeft
public void ifLeft(java.util.function.Consumer<? super L> f)
-
ifRight
public void ifRight(java.util.function.Consumer<? super R> f)
-
exec
public void exec(java.util.function.Consumer<? super L> ifLeft, java.util.function.Consumer<? super R> ifRight)
-
mapRight
public <R2> Either<L,R2> mapRight(java.util.function.Function<? super R,? extends R2> f)
-
map
public <L2,R2> Either<L2,R2> map(java.util.function.Function<? super L,? extends L2> f, java.util.function.Function<? super R,? extends R2> g)
-
flatMap
public <L2,R2> Either<L2,R2> flatMap(java.util.function.Function<? super L,Either<L2,R2>> f, java.util.function.Function<? super R,Either<L2,R2>> g)
-
flatMapLeft
public <L2> Either<L2,R> flatMapLeft(java.util.function.Function<? super L,Either<L2,R>> f)
- Specified by:
flatMapLeftin interfaceEither<L,R>
-
flatMapRight
public <R2> Either<L,R2> flatMapRight(java.util.function.Function<? super R,Either<L,R2>> f)
- Specified by:
flatMapRightin interfaceEither<L,R>
-
unify
public <T> T unify(java.util.function.Function<? super L,? extends T> f, java.util.function.Function<? super R,? extends T> g)
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-