|
||||||||||
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.MaxLenghtConstraint
public final class MaxLenghtConstraint
A constraint to set a max length.
Constructor Summary | |
---|---|
MaxLenghtConstraint(int maxLength,
java.lang.String fieldName,
boolean canBenNull,
boolean numerical)
Construct a new MaxLenghtConstraint. |
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 MaxLenghtConstraint(int maxLength, java.lang.String fieldName, boolean canBenNull, boolean numerical)
maxLength
- The maximum length of the field.fieldName
- The field name.canBenNull
- Can the field be null ?numerical
- Must the field be numerical ?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 |