Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.voytechs.jnetstream.codec
Class FieldImpl  view FieldImpl download FieldImpl.java

java.lang.Object
  extended bycom.voytechs.jnetstream.codec.FieldImpl
All Implemented Interfaces:
Field, Identity, MutableField

public class FieldImpl
extends java.lang.Object
implements Field, MutableField


Field Summary
(package private) static java.lang.String bits
           
private static boolean debug
           
private  java.util.Hashtable fieldHash
           
private  java.util.ArrayList fieldList
           
private  java.lang.String name
           
private  java.util.ArrayList notes
           
private  java.util.Hashtable perm
           
private  com.voytechs.jnetstream.primitive.Primitive primitive
           
(package private) static java.lang.String space
           
private  java.util.Hashtable temp
           
static java.lang.String VALUE_NAME
           
private  java.lang.String valueName
           
 
Fields inherited from interface com.voytechs.jnetstream.codec.Field
COMMON, DESCRIPTION, FORMAT, HIDENAME, HIDEVALUE, HTTP, MAX, MIN, MODIFIED, UNITS, UNITVALUE
 
Fields inherited from interface com.voytechs.jnetstream.codec.Identity
SHORT_NAME
 
Constructor Summary
FieldImpl(java.lang.String name, java.util.Hashtable permProperties, com.voytechs.jnetstream.primitive.Primitive primitive)
           
 
Method Summary
 void addField(Field field)
          Adds a new field to the packet.
 void addNote(Note note)
           
 Field getField(int index)
          Returns the indexed field from the packet.
 Field getField(java.lang.String name)
          Returns the named field from the packet.
 int getFieldCount()
          Returns the size of this packet.
 java.lang.String getName()
          Test function for Identity
 com.voytechs.jnetstream.primitive.Primitive getPrimitive()
          Returns the value Primitive of this field.
 com.voytechs.jnetstream.primitive.Primitive getProperty(java.lang.String name)
           
 int getSize()
           
 java.lang.String getValueName()
           
 boolean hasFields()
          Returns true if this field has sub fields of its own.
 boolean isMultiLine()
           
static void main(java.lang.String[] args)
          Test function for FieldImpl
 com.voytechs.jnetstream.io.OutputBuffer print(com.voytechs.jnetstream.io.OutputBuffer s, java.lang.String pre)
           
 void setProperty(java.lang.String name, com.voytechs.jnetstream.primitive.Primitive property)
           
 void setValueName(java.lang.String name)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 com.voytechs.jnetstream.io.OutputBuffer toStringPost(com.voytechs.jnetstream.io.OutputBuffer s, java.lang.String pre, int max)
           
 com.voytechs.jnetstream.io.OutputBuffer toStringPre(com.voytechs.jnetstream.io.OutputBuffer s, java.lang.String pre)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

FieldImpl

public FieldImpl(java.lang.String name,
                 java.util.Hashtable permProperties,
                 com.voytechs.jnetstream.primitive.Primitive primitive)
Method Detail

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