java.lang.Object
java.lang.Record
info.jab.util.either.Left<L,R>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<T> TApplies either the leftMapper function to the value if this is a Left, or the rightMapper function if this is a Right.get()Returns the value if this is a Right, otherwise throws an exception.final inthashCode()Returns a hash code value for this object.booleanisLeft()Checks if this is an instance of Left.booleanisRight()Checks if this is an instance of Right.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Left
Constructs a newLeftwith the given value.- Parameters:
value- the value to be contained in thisLeft- Throws:
NullPointerException- ifvalueisnull
-
-
Method Details
-
fold
-
isLeft
-
isRight
-
get
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
value
-