com.codestreet.messageforge
Class RFldNumeric

java.lang.Object
  extended bycom.codestreet.messageforge.RFld
      extended bycom.codestreet.messageforge.RFldNumeric
All Implemented Interfaces:
RFldInterface, java.io.Serializable
Direct Known Subclasses:
RFldDecimal, RFldF32, RFldF64, RFldI16, RFldI32, RFldI64, RFldI8

public abstract class RFldNumeric
extends RFld

Base class of all numeric fields.

Author:
Jawaid Hakim.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.codestreet.messageforge.RFld
desc_, fieldId_, locked_, name_, optional_, propertyName_, tags_, transient_, valSet_
 
Constructor Summary
protected RFldNumeric()
          Default constructor.
protected RFldNumeric(java.lang.String name, int fieldId)
          Constructor.
protected RFldNumeric(java.lang.String name, int fieldId, java.lang.String desc)
          Constructor.
 
Method Summary
 void addConstraint(RFldConstraintNumeric cons)
          Add a constraint.
protected  boolean validType(short type)
          Check if a data type is a valid numeric type.
 
Methods inherited from class com.codestreet.messageforge.RFld
addConstraint, buildMinMaxConstraintKey, equals, getConstraint, getConstraintCount, getDesc, getId, getName, getOptional, getPropertyName, getTag, getTags, getTransient, getType, getValueAsString, hashCode, isConstrained, isLocked, isProperty, isValSet, marshal, marshal, reset, set, set, setId, setLocked, setName, setOptional, setPropertyName, setTags, setTransient, setXmlAttrNames, setXmlTags, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.codestreet.messageforge.RFldInterface
getValueAsHashtable, getValueAsObject
 

Constructor Detail

RFldNumeric

protected RFldNumeric()
Default constructor.


RFldNumeric

protected RFldNumeric(java.lang.String name,
                      int fieldId)
Constructor.

Parameters:
name - Field name.
fieldId - Field id. Field ids must be either 0 to indicate that there is no id on the field, or greater. In addition, field ids must be unique within a messages - no two fields are allowed to have the same field id.

RFldNumeric

protected RFldNumeric(java.lang.String name,
                      int fieldId,
                      java.lang.String desc)
Constructor.

Parameters:
name - Field name.
fieldId - Field id. Field ids must be either 0 to indicate that there is no id on the field, or greater. In addition, field ids must be unique within a messages - no two fields are allowed to have the same field id.
desc - Field description.
Method Detail

addConstraint

public void addConstraint(RFldConstraintNumeric cons)
                   throws FieldValidationException
Add a constraint.

Parameters:
cons - Constraint.
Throws:
FieldValidationException

validType

protected boolean validType(short type)
Check if a data type is a valid numeric type.

Parameters:
type - Data type.
Returns:
true if type is a valid numeric type. Otherwise, returns false.


Copyright © 2003-2006 CodeStreet. All Rights Reserved.