|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.openptk.structure.Structure
public abstract class Structure
The abstract base class for a Structure. Provides core method implementations.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Structure(java.lang.String name)
Create a new Structure using the provided name. |
|
Structure(java.lang.String name,
boolean value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Boolean value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Boolean[] values)
Create a new Structure using the provided name and array of values. |
|
Structure(java.lang.String name,
int value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Integer value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Integer[] values)
Create a new Structure using the provided name and array of values. |
|
Structure(java.lang.String name,
java.util.List<java.lang.String> values)
Create a new Structure using the provided name and List of values. |
|
Structure(java.lang.String name,
long value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Long value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Long[] values)
Create a new Structure using the provided name and array of values. |
|
Structure(java.lang.String name,
java.lang.Object value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.Object[] values)
Create a new Structure using the provided name and array of values. |
|
Structure(java.lang.String name,
java.lang.String value)
Create a new Structure using the provided name and value. |
|
Structure(java.lang.String name,
java.lang.String[] values)
Create a new Structure using the provided name and Array of values. |
|
Structure(java.lang.String name,
StructureIF struct)
Create a new Structure using the provide name and child Structure. |
|
| Method Summary | |
|---|---|
void |
addChild(StructureIF child)
Adds the provided Structure as a Child. |
void |
addValue(boolean value)
Add boolean to the Structure value. |
void |
addValue(java.lang.Boolean value)
Add Boolean to the Structure value. |
void |
addValue(int value)
Add integer to the Structure value. |
void |
addValue(java.lang.Integer value)
Add Integer to the Structure value. |
void |
addValue(long value)
Add long to the Structure value. |
void |
addValue(java.lang.Long value)
Add Long to the Structure value. |
void |
addValue(java.lang.Object value)
Add Object to the Structure value. |
void |
addValue(java.lang.String value)
Add String to the Structure value. |
StructureIF |
getChild(java.lang.String name)
Returns the specified Child Structure. |
java.util.List<StructureIF> |
getChildren()
Returns all Child Structures as a List. |
java.util.List<StructureIF> |
getChildren(java.lang.String name)
Returns a List (of Children) that match the provided name. |
StructureIF[] |
getChildrenAsArray()
Returns all Child Structures as an Array. |
StructureIF[] |
getChildrenAsArray(java.lang.String name)
Returns an Structure array (of Children) that match the provided name. |
java.lang.String[] |
getChildrenIds()
Returns a String Array containing the Childrens id (name). |
java.lang.String |
getName()
Get the Structure name. |
StructureIF |
getParent()
Returns the Structure Parent (if it is a Child). |
State |
getState()
Get the Structure's State. |
java.lang.Object |
getValue()
Returns the value (if single valued) or the first value (is multi valued) If there is no value, null will be returned. |
java.lang.String |
getValueAsString()
Returns a String representation of the (first) value. |
java.util.List<java.lang.Object> |
getValues()
Returns the List of values (Object). |
java.lang.Object[] |
getValuesAsArray()
Returns an Array of values (Object). |
java.lang.String |
getValuesAsString()
Returns a String representation of all (List) the values. |
StructureType |
getValueType()
Returns the Structure Type. |
boolean |
hasChild(java.lang.String name)
Returns TRUE if a Child exists with the specified name. |
boolean |
hasChildren()
Returns TRUE if the Structure contains one or more Children. |
boolean |
isMultiValued()
Returns TRUE if the Structure contains more than 1 (one) value. |
void |
setChild(int index,
StructureIF child)
Sets / Replaces a specific Child with the provided Structure. |
void |
setName(java.lang.String name)
Set the Structure's name. |
void |
setParent(StructureIF struct)
Set the Structure's parent. |
void |
setState(State state)
Set the Structure State. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Structure(java.lang.String name)
name - Name of the Structure
public Structure(java.lang.String name,
boolean value)
name - Name of the Structurevalue - boolean
public Structure(java.lang.String name,
java.lang.Boolean value)
name - Name of the Structurevalue - Boolean
public Structure(java.lang.String name,
java.lang.Boolean[] values)
name - Name of the Structurevalues - Array of Boolean values
public Structure(java.lang.String name,
int value)
name - Name of the Structurevalue - Structure integer value
public Structure(java.lang.String name,
java.lang.Integer value)
name - Name of the Structurevalue - Structure Integer value
public Structure(java.lang.String name,
java.lang.Integer[] values)
name - Name of the Structurevalues - Array of Integers
public Structure(java.lang.String name,
java.util.List<java.lang.String> values)
name - Name of the Structurevalues - List of values
public Structure(java.lang.String name,
long value)
name - Name of the Structurevalue - Structure long value
public Structure(java.lang.String name,
java.lang.Long value)
name - Name of the Structurevalue - Structure Long value
public Structure(java.lang.String name,
java.lang.Long[] values)
name - Name of the Structurevalues - Array of Longs
public Structure(java.lang.String name,
java.lang.Object value)
name - Name of the Structurevalue - Object
public Structure(java.lang.String name,
java.lang.Object[] values)
name - Name of the Structurevalues - Array of Object values
public Structure(java.lang.String name,
java.lang.String value)
name - Name of the Structurevalue - Structure value
public Structure(java.lang.String name,
java.lang.String[] values)
name - Name of the Structurevalues - Array of values
public Structure(java.lang.String name,
StructureIF struct)
name - Name of the Structurestruct - The child Structure| Method Detail |
|---|
public final void addChild(StructureIF child)
throws StructureException
addChild in interface StructureIFchild - Child Structure
StructureException
public final void addValue(boolean value)
throws StructureException
addValue in interface StructureIFvalue - boolean to add
StructureException
public final void addValue(java.lang.Boolean value)
throws StructureException
addValue in interface StructureIFvalue - Boolean to add
StructureException
public final void addValue(int value)
throws StructureException
addValue in interface StructureIFvalue - integer to add
StructureException
public final void addValue(java.lang.Integer value)
throws StructureException
addValue in interface StructureIFvalue - Integer to add
StructureException
public final void addValue(long value)
throws StructureException
addValue in interface StructureIFvalue - long to add
StructureException
public final void addValue(java.lang.Long value)
throws StructureException
addValue in interface StructureIFvalue - Long to add
StructureException
public final void addValue(java.lang.Object value)
throws StructureException
addValue in interface StructureIFvalue - Object to add
StructureException
public final void addValue(java.lang.String value)
throws StructureException
addValue in interface StructureIFvalue - String to add
StructureExceptionpublic final StructureIF getChild(java.lang.String name)
getChild in interface StructureIFname - Child Structure name
public final java.util.List<StructureIF> getChildren()
getChildren in interface StructureIFpublic final java.util.List<StructureIF> getChildren(java.lang.String name)
getChildren in interface StructureIFname - The child name
public final StructureIF[] getChildrenAsArray()
getChildrenAsArray in interface StructureIFpublic final StructureIF[] getChildrenAsArray(java.lang.String name)
getChildrenAsArray in interface StructureIFname - The child name
public final java.lang.String[] getChildrenIds()
getChildrenIds in interface StructureIFpublic final java.lang.String getName()
getName in interface StructureIFpublic final StructureIF getParent()
getParent in interface StructureIFpublic final State getState()
getState in interface StructureIFpublic final java.lang.Object getValue()
getValue in interface StructureIFpublic final java.lang.String getValueAsString()
getValueAsString in interface StructureIFpublic final java.util.List<java.lang.Object> getValues()
getValues in interface StructureIFpublic final java.lang.Object[] getValuesAsArray()
getValuesAsArray in interface StructureIFpublic final java.lang.String getValuesAsString()
getValuesAsString in interface StructureIFpublic final StructureType getValueType()
getValueType in interface StructureIFpublic final boolean hasChild(java.lang.String name)
hasChild in interface StructureIFname - Child Structure name
public final boolean hasChildren()
hasChildren in interface StructureIFpublic final boolean isMultiValued()
isMultiValued in interface StructureIF
public final void setChild(int index,
StructureIF child)
throws StructureException
setChild in interface StructureIFindex - child offsetchild - Child Structure
StructureExceptionpublic final void setName(java.lang.String name)
setName in interface StructureIFname - Structure's namepublic final void setParent(StructureIF struct)
Note: In most situation this method should not be used / needed. The Child/Parent relationship is maintained by the addChild() and setChild() methods.
setParent in interface StructureIFstruct - Parent Structurepublic final void setState(State state)
setState in interface StructureIFstate - A valid Statepublic final java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||