|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jtheque.core.utils.ui.constraints.NotNullConstraint
public final class NotNullConstraint
A constraint to indicate that the field cannot be null.
Constructor Summary | |
---|---|
NotNullConstraint(java.lang.String fieldName)
Construct a new NotNullConstraint. |
Method Summary | |
---|---|
boolean |
canBeNullOrEmpty()
Indicate if the value can be null or not. |
int |
maxLength()
Return the max length of the value. |
boolean |
mustBeNumerical()
Indicate if the value must be numerical or not. |
boolean |
mustControlLength()
Indicate if we must control length or not. |
void |
validate(java.lang.Object field,
java.util.Collection<JThequeError> errors)
Validate the field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotNullConstraint(java.lang.String fieldName)
fieldName
- The field name.Method Detail |
---|
public int maxLength()
Constraint
maxLength
in interface Constraint
public boolean mustBeNumerical()
Constraint
mustBeNumerical
in interface Constraint
public boolean canBeNullOrEmpty()
Constraint
canBeNullOrEmpty
in interface Constraint
public boolean mustControlLength()
Constraint
mustControlLength
in interface Constraint
public void validate(java.lang.Object field, java.util.Collection<JThequeError> errors)
Constraint
validate
in interface Constraint
field
- The field to validate.errors
- The errors list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |