public class Either<T> extends BaseConstraint<T>
| Constructor and Description |
|---|
Either(Constraint<T> c1,
Constraint<T> c2)
Creates an instance from two constraints.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(T t)
Returns
true if a value satisfies the constraint. |
List<Constraint<T>> |
constraints()
Returns the constraints combined in this instance.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
public Either(Constraint<T> c1, Constraint<T> c2)
c1 - the first constraintc2 - the second constraintpublic List<Constraint<T>> constraints()
public boolean accepts(T t)
Constrainttrue if a value satisfies the constraint.t - the value.true if the value satisfies the constraint, false if it does not.public String toString()
toString in class BaseConstraint<T>Copyright © 2018. All Rights Reserved.