org.openfast.template.type
Class IntegerType
java.lang.Object
org.openfast.template.type.Type
org.openfast.template.type.SimpleType
org.openfast.template.type.IntegerType
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- SignedIntegerType, UnsignedIntegerType
public abstract class IntegerType
- extends SimpleType
- See Also:
- Serialized Form
| Fields inherited from class org.openfast.template.type.Type |
ALL_TYPES, ASCII, BYTE_VECTOR, DECIMAL, I16, I32, I64, I8, INTEGER_TYPES, STRING, U16, U32, U64, U8, UNICODE |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
minValue
protected final long minValue
maxValue
protected final long maxValue
IntegerType
public IntegerType(java.lang.String typeName,
long minValue,
long maxValue,
TypeCodec codec,
TypeCodec nullableCodec)
getVal
protected ScalarValue getVal(java.lang.String value)
- Specified by:
getVal in class SimpleType
- Parameters:
value -
- Returns:
- either longvalue or integervalue depending on size of parsed
number
getDefaultValue
public ScalarValue getDefaultValue()
- Specified by:
getDefaultValue in class Type
- Returns:
- Returns a default value
isValueOf
public boolean isValueOf(ScalarValue previousValue)
- Specified by:
isValueOf in class Type
- Parameters:
previousValue - The previous value of the Field, used in determining the
corresponding field value for the current message being
decoded.
- Returns:
- Returns true if the passed value is an instance of an integer or
long
validateValue
public void validateValue(ScalarValue value)
- Validates the passed ScalarValue, if fails, throws error.
- Overrides:
validateValue in class Type
- Parameters:
value - The ScalarValue object to be validated
Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.