public abstract class WithGroupOrUnitNode extends java.lang.Object implements IWithGroupOrUnitNode
| Constructor and Description |
|---|
WithGroupOrUnitNode()
Creates a new
WithGroupOrUnitNode object. |
| Modifier and Type | Method and Description |
|---|---|
GroupNode |
add(GroupNode node)
Adds a
GroupNode to this object. |
UnitNode |
add(UnitNode node)
Adds a
UnitNode to this object. |
GroupNode |
addGroupNode(java.lang.String id)
Adds a
GroupNode to this object. |
UnitNode |
addUnitNode(java.lang.String id)
Adds a
UnitNode to this object. |
java.util.Iterator<IGroupOrUnitNode> |
createGroupOrUnitIterator()
Creates an iterator for the group nodes and unit nodes in this object.
|
GroupNode |
getGroupNode(java.lang.String id)
Gets a
GroupNode for a given id. |
UnitNode |
getUnitNode(java.lang.String id)
Gets the
UnitNode for a given unit id. |
java.util.List<UnitNode> |
getUnitNodes()
Gets all the
UnitNode elements of this object. |
public WithGroupOrUnitNode()
WithGroupOrUnitNode object.public UnitNode add(UnitNode node)
IWithGroupOrUnitNodeUnitNode to this object.add in interface IWithGroupOrUnitNodenode - the unit node to add.IWithGroupOrUnitNode.addUnitNode(String)public UnitNode addUnitNode(java.lang.String id)
IWithGroupOrUnitNodeUnitNode to this object.addUnitNode in interface IWithGroupOrUnitNodeid - the ID of the new unit.public GroupNode add(GroupNode node)
IWithGroupOrUnitNodeGroupNode to this object.
If the group ID is null, it is automatically set to a UUID.add in interface IWithGroupOrUnitNodenode - the group node to add.IWithGroupOrUnitNode.addGroupNode(String)public GroupNode addGroupNode(java.lang.String id)
IWithGroupOrUnitNodeGroupNode to this object.addGroupNode in interface IWithGroupOrUnitNodeid - the ID of the group (can be null). If the ID is null it is automatically set to a UUID.public java.util.List<UnitNode> getUnitNodes()
IWithGroupOrUnitNodeUnitNode elements of this object.
All units at any level in this object are returned.getUnitNodes in interface IWithGroupOrUnitNodepublic UnitNode getUnitNode(java.lang.String id)
IWithGroupOrUnitNodeUnitNode for a given unit id.
The unit can be at any level in this object.getUnitNode in interface IWithGroupOrUnitNodeid - the id to look for.public GroupNode getGroupNode(java.lang.String id)
IWithGroupOrUnitNodeGroupNode for a given id.
The group can be at any level in this object.getGroupNode in interface IWithGroupOrUnitNodeid - the id to look for.public java.util.Iterator<IGroupOrUnitNode> createGroupOrUnitIterator()
IWithGroupOrUnitNodecreateGroupOrUnitIterator in interface IWithGroupOrUnitNode