|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.core.closure.support.AlgorithmsAccessor
org.springframework.rules.constraint.ConstraintsAccessor
org.springframework.rules.constraint.AbstractBinaryConstraint
org.springframework.rules.constraint.ComparisonBinaryPredicate
org.springframework.rules.constraint.EqualTo
public class EqualTo
Constraint that tests object equality (not identity.)
Field Summary | |
---|---|
static EqualTo |
INSTANCE
|
Constructor Summary | |
---|---|
EqualTo()
|
|
EqualTo(Comparator comparator)
|
Method Summary | |
---|---|
static BinaryConstraint |
instance()
|
static BinaryConstraint |
instance(Comparator c)
|
static void |
load(EqualTo instance)
|
boolean |
test(Object argument1,
Object argument2)
Test if the two arguments are equal. |
protected boolean |
testCompareResult(int result)
Template method for evaluating the compare result. |
String |
toString()
|
static Constraint |
value(Object value)
|
static Constraint |
value(Object value,
Comparator comparator)
|
Methods inherited from class org.springframework.rules.constraint.ComparisonBinaryPredicate |
---|
getComparator |
Methods inherited from class org.springframework.rules.constraint.AbstractBinaryConstraint |
---|
test |
Methods inherited from class org.springframework.rules.constraint.ConstraintsAccessor |
---|
all, all, and, any, any, bind, bind, bind, bind, bind, conjunction, disjunction, eq, eq, eq, eq, eq, eqProperty, eqProperty, getConstraints, gt, gt, gt, gt, gt, gt, gt, gte, gte, gte, gte, gte, gte, gte, gteProperty, gteProperty, gtProperty, gtProperty, ifTrue, ifTrueElse, inGroup, inGroup, inGroup, inRange, inRange, inRangeProperties, inRangeProperties, like, like, lt, lt, lt, lt, lt, lt, lt, lte, lte, lte, lte, lte, lte, lte, lteProperty, lteProperty, ltProperty, ltProperty, maxLength, method, minLength, not, not, or, present, present, range, range, range, range, range, range, range, regexp, regexp, required, required, testResultOf, unique, value |
Methods inherited from class org.springframework.core.closure.support.AlgorithmsAccessor |
---|
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst, forEach, forEach, getAlgorithms |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static EqualTo INSTANCE
Constructor Detail |
---|
public EqualTo()
public EqualTo(Comparator comparator)
Method Detail |
---|
public static BinaryConstraint instance()
public static void load(EqualTo instance)
public static BinaryConstraint instance(Comparator c)
public static Constraint value(Object value)
public static Constraint value(Object value, Comparator comparator)
public boolean test(Object argument1, Object argument2)
test
in interface BinaryConstraint
test
in class ComparisonBinaryPredicate
argument1
- the first argumentargument2
- the second argument
protected boolean testCompareResult(int result)
ComparisonBinaryPredicate
testCompareResult
in class ComparisonBinaryPredicate
result
- The compare result
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |