org.openfast.template.type.codec
Class IntegerCodec

java.lang.Object
  extended by org.openfast.template.type.codec.TypeCodec
      extended by org.openfast.template.type.codec.IntegerCodec
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NullableSignedInteger, NullableUnsignedInteger, SignedInteger, UnsignedInteger

public abstract class IntegerCodec
extends TypeCodec

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openfast.template.type.codec.TypeCodec
ASCII, BIT_VECTOR, BYTE_VECTOR, DATE_INTEGER, DATE_STRING, EPOCH_TIMESTAMP, INTEGER, NULLABLE_ASCII, NULLABLE_BYTE_VECTOR_TYPE, NULLABLE_INTEGER, NULLABLE_SF_SCALED_NUMBER, NULLABLE_STRING_DELTA, NULLABLE_UNICODE, NULLABLE_UNSIGNED_INTEGER, SF_SCALED_NUMBER, STOP_BIT, STRING_DELTA, TIME_IN_MS, TIME_INTEGER, TIME_STRING, TIMESTAMP_INTEGER, TIMESTAMP_STRING, UINT, UNICODE
 
Constructor Summary
protected IntegerCodec()
           
 
Method Summary
protected static ScalarValue createValue(long value)
          Creates a new value, long or integer, depends on value passed to method
 boolean equals(java.lang.Object obj)
           
static int getSignedIntegerSize(long value)
          Find the signed integer size for the passed long value
static int getUnsignedIntegerSize(long value)
           
 
Methods inherited from class org.openfast.template.type.codec.TypeCodec
decode, encode, encodeValue, isNullable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerCodec

protected IntegerCodec()
Method Detail

createValue

protected static ScalarValue createValue(long value)
Creates a new value, long or integer, depends on value passed to method

Parameters:
value - The passed value to be created
Returns:
If the long is larger than an integer - returns a new LongValue object, otherwise returns an ScalarValue object of type integer of the passed long value

getUnsignedIntegerSize

public static int getUnsignedIntegerSize(long value)
Parameters:
value - The long to determine the unsigned integer
Returns:
Returns an unsigned integer

getSignedIntegerSize

public static int getSignedIntegerSize(long value)
Find the signed integer size for the passed long value

Parameters:
value - The long value to be used to get the signed integer size
Returns:
Returns an integer of the appropriate signed integer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.