quickfix
Class Field<T>

java.lang.Object
  extended by quickfix.Field<T>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BooleanField, BytesField, CharField, DateField, DecimalField, DoubleField, IntField, StringField

public class Field<T>
extends java.lang.Object
implements java.io.Serializable

Base class for FIX message fields. This class should be abstract but that would break compatibility with the QF JNI classes.

See Also:
Serialized Form

Constructor Summary
Field(int field, T object)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 int getField()
          Gets the field's tag.
 T getObject()
          Get the field value
 int getTag()
          Gets the field's tag.
 int hashCode()
           
protected  java.lang.String objectAsString()
           
protected  void setObject(T object)
          Sets the field's value to the given object.
 void setTag(int tag)
           
 java.lang.String toString()
          Return's the formatted field (tag=value)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field(int field,
             T object)
Method Detail

getTag

public int getTag()
Gets the field's tag.

Returns:
the tag

getField

public int getField()
Gets the field's tag. (QF/C++ compatibility)

Returns:
the tag
See Also:
getTag()

setObject

protected void setObject(T object)
Sets the field's value to the given object.

Parameters:
object -

getObject

public T getObject()
Get the field value

Returns:
an object representing the field's value

toString

public java.lang.String toString()
Return's the formatted field (tag=value)

Overrides:
toString in class java.lang.Object
Returns:
the formatted field

objectAsString

protected java.lang.String objectAsString()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setTag

public void setTag(int tag)