public interface Constraint extends Storable, Cloneable
ConstraintValidator
.Modifier and Type | Field and Description |
---|---|
static int |
EQUALS
The condition is equality
|
static int |
GEQ
The condition is greater or equal
|
static int |
GT
The condition is greater than
|
static int |
LEQ
The condition is less or equal
|
static int |
LT
The condition is less than
|
Modifier and Type | Method and Description |
---|---|
boolean |
check(Object value)
Checks
value for the constraint defined in the
Constraint . |
Constraint |
clone()
This method returns a deep copy of the current instance.
|
String |
getErrorMessage()
Returns the message of the last error (missed constraint) or
null if the constraint was fulfilled by the last checked
value. |
static final int EQUALS
static final int LT
static final int GT
static final int LEQ
static final int GEQ
boolean check(Object value)
value
for the constraint defined in the
Constraint
. If the constraint is fulfilled, true
is
returned.value
- the Object
to be checkedtrue
if the constraint is fulfilled,
false
otherwiseString getErrorMessage()
null
if the constraint was fulfilled by the last checked
value.null
Constraint clone() throws CloneNotSupportedException
CloneNotSupportedException
- if the Constraint
could not be clonedCloneable