com.codestreet.messageforge
Class RFldConstraintDatetimeEnum
java.lang.Object
com.codestreet.messageforge.RFldConstraintDatetime
com.codestreet.messageforge.RFldConstraintDatetimeEnum
- All Implemented Interfaces:
- RFldConstraint
- public class RFldConstraintDatetimeEnum
- extends RFldConstraintDatetime
Class to represent an enumeration constraint on a date/time message field.
- Author:
- Jawaid Hakim.
Field Summary |
protected java.util.Date[] |
enums_
Enumeration of allowed values. |
Method Summary |
java.lang.String |
errDesc(java.lang.String fldName)
Get error description. |
boolean |
isValid(java.util.Date val)
Check if a value satisfies the constraint. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
enums_
protected java.util.Date[] enums_
- Enumeration of allowed values.
RFldConstraintDatetimeEnum
public RFldConstraintDatetimeEnum(java.lang.String fldName,
java.util.Date[] enums)
throws FieldValidationException
- Constructor.
- Parameters:
fldName
- Name of field to which this constraint is bound.enums
- Enumeration of allowed values.
errDesc
public java.lang.String errDesc(java.lang.String fldName)
- Get error description.
- Parameters:
fldName
- Field name.
- Returns:
- Error description.
isValid
public boolean isValid(java.util.Date val)
- Check if a value satisfies the constraint.
- Specified by:
isValid
in class RFldConstraintDatetime
- Parameters:
val
- Data to validate.
- Returns:
- true if the data satisfied the
constraint. Otherwise, false is returned.
Copyright © 2003-2006 CodeStreet. All Rights Reserved.