java.lang.Object
com.voytechs.jnetstream.codec.FieldImpl
- All Implemented Interfaces:
- Field, Identity, MutableField
- public class FieldImpl
- extends java.lang.Object
- implements Field, MutableField
| Fields inherited from interface com.voytechs.jnetstream.codec.Field |
COMMON, DESCRIPTION, FORMAT, HIDENAME, HIDEVALUE, HTTP, MAX, MIN, MODIFIED, UNITS, UNITVALUE |
debug
private static final boolean debug
- See Also:
- Constant Field Values
VALUE_NAME
public static final java.lang.String VALUE_NAME
- See Also:
- Constant Field Values
fieldList
private java.util.ArrayList fieldList
fieldHash
private java.util.Hashtable fieldHash
notes
private java.util.ArrayList notes
name
private java.lang.String name
perm
private java.util.Hashtable perm
temp
private java.util.Hashtable temp
primitive
private com.voytechs.jnetstream.primitive.Primitive primitive
valueName
private java.lang.String valueName
bits
static java.lang.String bits
space
static java.lang.String space
FieldImpl
public FieldImpl(java.lang.String name,
java.util.Hashtable permProperties,
com.voytechs.jnetstream.primitive.Primitive primitive)
getPrimitive
public com.voytechs.jnetstream.primitive.Primitive getPrimitive()
- Returns the value Primitive of this field.
- Specified by:
getPrimitive in interface Field
getSize
public int getSize()
- Specified by:
getSize in interface Field
hasFields
public boolean hasFields()
- Returns true if this field has sub fields of its own.
- Specified by:
hasFields in interface Field
setProperty
public void setProperty(java.lang.String name,
com.voytechs.jnetstream.primitive.Primitive property)
- Specified by:
setProperty in interface MutableField
addNote
public void addNote(Note note)
- Specified by:
addNote in interface MutableField
getProperty
public com.voytechs.jnetstream.primitive.Primitive getProperty(java.lang.String name)
- Specified by:
getProperty in interface Identity
addField
public void addField(Field field)
- Adds a new field to the packet.
- Specified by:
addField in interface MutableField
getField
public Field getField(java.lang.String name)
- Returns the named field from the packet.
- Specified by:
getField in interface Field
getField
public Field getField(int index)
- Returns the indexed field from the packet.
- Specified by:
getField in interface Field
getFieldCount
public int getFieldCount()
- Returns the size of this packet. Size refers to number of fields
decoded. Only fields that this codec understands are decoded. There may
be additional undecoded fields of other protocoal still in the stack.
- Specified by:
getFieldCount in interface Field
getName
public java.lang.String getName()
- Description copied from interface:
Identity
- Test function for Identity
- Specified by:
getName in interface Identity
setValueName
public void setValueName(java.lang.String name)
getValueName
public java.lang.String getValueName()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
print
public com.voytechs.jnetstream.io.OutputBuffer print(com.voytechs.jnetstream.io.OutputBuffer s,
java.lang.String pre)
toStringPre
public com.voytechs.jnetstream.io.OutputBuffer toStringPre(com.voytechs.jnetstream.io.OutputBuffer s,
java.lang.String pre)
isMultiLine
public boolean isMultiLine()
toStringPost
public com.voytechs.jnetstream.io.OutputBuffer toStringPost(com.voytechs.jnetstream.io.OutputBuffer s,
java.lang.String pre,
int max)
main
public static void main(java.lang.String[] args)
- Test function for FieldImpl