Package io.atlassian.fugue.law
Class IsEq<A>
- java.lang.Object
-
- io.atlassian.fugue.law.IsEq<A>
-
public final class IsEq<A> extends java.lang.ObjectRepresents two values of the same type that are expected to be equal.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> IsEq<A>isEq(A lhs, A rhs)Two equal elementsAlhs()Access the left element<R> Rmatch(java.util.function.BiFunction<A,A,R> cases)Function to use for comparison of two equal elementsArhs()Access the right element
-
-
-
Method Detail
-
match
public <R> R match(java.util.function.BiFunction<A,A,R> cases)
Function to use for comparison of two equal elements- Type Parameters:
R- result type- Parameters:
cases- aBiFunctiontaking two values of this equality class- Returns:
- a R object.
-
lhs
public A lhs()
Access the left element- Returns:
- left hand side,
-
rhs
public A rhs()
Access the right element- Returns:
- right hand side,
-
-