|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.opentrac.OpenTracElement
public abstract class OpenTracElement
This class is the generic parent of the different data types of OpenTrac element data. Subclasses of this class should be implemented for each value data type (byte, short, float, string, etc.).
Field Summary | |
---|---|
int |
id
|
Constructor Summary | |
---|---|
OpenTracElement()
|
Method Summary | |
---|---|
abstract int |
computeBody(byte[] buf,
int offset)
Append this element to a message buffer |
abstract boolean |
equals(OpenTracElement other)
Test if this OpenTracElement has the same type and value as another OpenTracElement. |
int |
getId()
Get the element ID for this element. |
abstract int |
length()
Return the number of bytes needed to encode this element. |
java.lang.String |
toString()
Returns a string representation of the object. |
abstract java.lang.String |
valueString()
Get the string representation of the value of this element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int id
Constructor Detail |
---|
public OpenTracElement()
Method Detail |
---|
public int getId()
public abstract java.lang.String valueString()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract int computeBody(byte[] buf, int offset)
buf
- byte array to add the element tooffset
- starting index to store the element
public abstract int length()
public abstract boolean equals(OpenTracElement other)
other
- OpenTracElement to compare against this element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |