|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.latencybusters.lbm.sdm.LBMSDM
com.latencybusters.lbm.sdm.LBMSDMFields
public class LBMSDMFields
LBMSDMFields is a utility class for LBMSDMessage to collect a set of fields. The intent of separating the set of fields from LBMSDMessage is to encourage reuse of the field set.
Field Summary |
---|
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM |
---|
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING |
Constructor Summary | |
---|---|
LBMSDMFields()
Constructor for an empty field set. |
|
LBMSDMFields(LBMSDMFieldsAttribute user_attr)
Constructor for an empty field set. |
Method Summary | |
---|---|
void |
add(LBMSDMField newfield)
Add an SDM field to the field set |
LBMSDMFields |
clone()
Get a copy of this object |
LBMSDMFieldsAttribute |
get_attr()
Get the field set attributes are associated with this message A copy is returned |
LBMSDMField |
get(int pos)
Get a field by the index |
java.util.Iterator |
iterator()
Get the default iterator for this field set |
int |
length()
Get the number of fields in the field set |
LBMSDMField |
locate(java.lang.String name)
Get a field in the field set based on the name. |
void |
remove(int pos)
Remove a field by specifying the index |
void |
remove(java.lang.String name)
Remove a field by specifying the name |
void |
set(LBMSDMField field)
Overwrite/set an existing field based on the name |
void |
set(LBMSDMField field,
int idx)
Overwrite/set an existing field based on the field set index |
void |
set(LBMSDMField newfield,
int fieldidx,
int arrayidx)
Overwrite/set an existing field based on the field set index and array element |
java.lang.String |
toDbgString()
Dump the internal representation of this field set which includes the fields. |
java.lang.String |
toString()
Dump the string representation of this field set which includes the fields. |
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDM |
---|
log, set_debug_level |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LBMSDMFields()
public LBMSDMFields(LBMSDMFieldsAttribute user_attr)
user_attr
- User attribute object setting options for this field setMethod Detail |
---|
public void add(LBMSDMField newfield) throws LBMSDMException
newfield
- The new field to be added
LBMSDMDuplicateFieldException
- when adding a field with the
same name as a field already in the field set
LBMSDMException
- when an unexpected error occurs within LBMSDMpublic void set(LBMSDMField field) throws LBMSDMException
field
- The new field value
LBMSDMAddingFieldException
- when the field doesn't exist
LBMSDMException
public void set(LBMSDMField field, int idx) throws LBMSDMException
field
- The new field valueidx
- The index into the field set of the field
LBMSDMAddingFieldException
- when the field doesn't exist
LBMSDMTypeMismatchException
- when the field isnt the same type as the element
LBMSDMException
public void set(LBMSDMField newfield, int fieldidx, int arrayidx) throws LBMSDMException
newfield
- The new field valuefieldidx
- The index into the field set of the fieldarrayidx
- The element in the array to be set
LBMSDMAddingFieldException
- when the field doesn't exist
LBMSDMTypeMismatchException
- when the field isnt the same type as the element
LBMSDMException
public int length()
public LBMSDMField get(int pos)
pos
- The index of the field required
public LBMSDMFieldsAttribute get_attr()
public void remove(int pos)
pos
- The index of the fieldpublic void remove(java.lang.String name)
name
- The field name to be removedpublic java.util.Iterator iterator()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDbgString()
public LBMSDMFields clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public LBMSDMField locate(java.lang.String name)
name
- The name of the field to be searched for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |