org.openfast.template.type
Class StringType

java.lang.Object
  extended by org.openfast.template.type.Type
      extended by org.openfast.template.type.SimpleType
          extended by org.openfast.template.type.StringType
All Implemented Interfaces:
java.io.Serializable

public class StringType
extends SimpleType

See Also:
Serialized Form

Field Summary
 
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
 
Constructor Summary
StringType(java.lang.String typeName, TypeCodec codec, TypeCodec nullableCodec)
           
 
Method Summary
 TypeCodec getCodec(Operator operator, boolean optional)
          Get the approprivate codec for the passed operator
 ScalarValue getDefaultValue()
           
 ScalarValue getVal(java.lang.String value)
           
 boolean isValueOf(ScalarValue previousValue)
           
 
Methods inherited from class org.openfast.template.type.SimpleType
getValue
 
Methods inherited from class org.openfast.template.type.Type
equals, getName, getRegisteredTypeMap, getType, hashCode, serialize, toString, validateValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringType

public StringType(java.lang.String typeName,
                  TypeCodec codec,
                  TypeCodec nullableCodec)
Method Detail

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 get
optional - 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.