com.codestreet.messageforge
Class RFldConstraintI8

java.lang.Object
  extended bycom.codestreet.messageforge.RFldConstraintI8
All Implemented Interfaces:
RFldConstraint, RFldConstraintNumeric
Direct Known Subclasses:
RFldConstraintI8Enum, RFldConstraintI8MinMax

public abstract class RFldConstraintI8
extends java.lang.Object
implements RFldConstraintNumeric

Class to represent a constraint on a numeric byte message field.

Author:
Jawaid Hakim.

Constructor Summary
protected RFldConstraintI8()
          Ctor.
 
Method Summary
abstract  java.lang.String errDesc(java.lang.String fldName)
          Get error description.
abstract  boolean isValid(byte val)
          Check if a message field satisfies the constraint.
 boolean isValid(RFld fld)
          Check if a message field satisfies the constraint.
 void validate(RFld fld)
          Check if a message field satisfies the constraint.
 void validate(RFld fld, byte 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
 

Constructor Detail

RFldConstraintI8

protected RFldConstraintI8()
Ctor.

Method Detail

errDesc

public abstract java.lang.String errDesc(java.lang.String fldName)
Get error description.

Specified by:
errDesc in interface RFldConstraint
Parameters:
fldName - Field name.
Returns:
Error description.

validate

public void validate(RFld fld)
              throws FieldValidationException
Check if a message field satisfies the constraint.

Specified by:
validate in interface RFldConstraint
Parameters:
fld - Field to validate.
Throws:
FieldValidationException
See Also:
RFld

validate

public void validate(RFld fld,
                     byte val)
              throws FieldValidationException
Check if a value satisfies the constraint.

Parameters:
fld - Field.
val - Value to validate.
Throws:
FieldValidationException

isValid

public boolean isValid(RFld fld)
Check if a message field satisfies the constraint.

Specified by:
isValid in interface RFldConstraint
Parameters:
fld - Field to validate.
Returns:
true if the field satisfies the constraint. Otherwise, false is returned.
See Also:
RFld

isValid

public abstract boolean isValid(byte val)
Check if a message field satisfies the constraint.

Parameters:
val - Field value to validate.
Returns:
true if the field satisfies the constraint. Otherwise, false is returned.
See Also:
RFld


Copyright © 2003-2006 CodeStreet. All Rights Reserved.