org.openfast.template.type
Class StringType
java.lang.Object
org.openfast.template.type.Type
org.openfast.template.type.SimpleType
org.openfast.template.type.StringType
- All Implemented Interfaces:
- java.io.Serializable
public class StringType
- 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 |
StringType
public StringType(java.lang.String typeName,
TypeCodec codec,
TypeCodec nullableCodec)
getVal
public ScalarValue getVal(java.lang.String value)
- Specified by:
getVal in class SimpleType
- Parameters:
value -
- Returns:
- StringValue of given value
getCodec
public TypeCodec getCodec(Operator operator,
boolean optional)
- Get the approprivate codec for the passed operator
- Overrides:
getCodec in class SimpleType
- Parameters:
operator - The operator object in which the codec is trying to getoptional - Determines if the Field is required or not for the data
- Returns:
- Returns the codec if the field is required
getDefaultValue
public ScalarValue getDefaultValue()
- Specified by:
getDefaultValue in class Type
- Returns:
- Returns a new StringValue object with empty string as the 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
Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.