JavaScript is disabled on your browser.
Type Parameters:
L - type of the left value
R - type of the right value
Direct Known Subclasses:
Xor.Left , Xor.Right
public abstract class Xor<L,R>
extends Object
Right biased disjunction mainly based on the Xor type from scala cats library.
This type is used for collecting salt errors that are in the place of a normal result.
Nested Class Summary
Nested Classes
static final class
static final class
Constructor Summary
Constructors
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
abstract void
abstract boolean
abstract <T> Xor <? super L ,T>
abstract <T> T
abstract boolean
abstract boolean
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Method Details
left
public static <L,
R> Xor.Left <L,R> left (L value)
right
public static <L,
R> Xor.Right <L,R> right (R value)
isRight
public abstract boolean isRight ()
isLeft
public abstract boolean isLeft ()
fold
public abstract <T> T fold (Function <? super L ,? extends T> mapLeft,
Function <? super R ,? extends T> mapRight)
consume
public abstract void consume (Consumer <? super L > consumerLeft,
Consumer <? super R > consumerRight)
map
public abstract <T> Xor <L ,T> map (Function <? super R ,? extends T> mapper)
flatMap
public abstract <T> Xor <? super L ,T> flatMap (Function <? super R ,Xor <? super L ,T>> mapper)
orElse
public abstract R orElse (R value)
getOrElse
public abstract R getOrElse (Supplier <? extends R > supplier)