Class Either.Right<A,B>
- java.lang.Object
-
- com.github.nullterminated.trylambda.Either<A,B>
-
- com.github.nullterminated.trylambda.Either.Right<A,B>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.nullterminated.trylambda.Either
Either.Left<A,B>, Either.Right<A,B>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Either<B,A>flip()Flip an Either<A,B> to a Either<B,A>.AgetLeft()BgetRight()inthashCode()<X,Y>
Either<X,Y>map(java.util.function.Function<A,X> leftFunction, java.util.function.Function<B,Y> rightFunction)Map this Either<A,B> to a new Either<X,Y>.<T> Treduce(java.util.function.Function<A,T> leftFunction, java.util.function.Function<B,T> rightFunction)Reduce an Either<A,B> to a single value type T.java.lang.StringtoString()voiduse(java.util.function.Consumer<A> leftConsumer, java.util.function.Consumer<B> rightConsumer)Pass the value of this either to a consumer.
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
use
public void use(java.util.function.Consumer<A> leftConsumer, java.util.function.Consumer<B> rightConsumer)
Description copied from class:EitherPass the value of this either to a consumer.
-
map
public <X,Y> Either<X,Y> map(java.util.function.Function<A,X> leftFunction, java.util.function.Function<B,Y> rightFunction)
Description copied from class:EitherMap this Either<A,B> to a new Either<X,Y>.
-
reduce
public <T> T reduce(java.util.function.Function<A,T> leftFunction, java.util.function.Function<B,T> rightFunction)
Description copied from class:EitherReduce an Either<A,B> to a single value type T.
-
-