All Packages Class Hierarchy This Package Previous Next Index
Class org.jcon.core.part.std.CellStd
java.lang.Object
|
+----org.jcon.core.part.std.CellStd
- public class CellStd
- extends Object
- implements Cell
This class represents a cell in a living organism,
which in UHR is a container in a System Tree. A Cell
holds zero or more Nodes, each of which may be a Cell
or leaf.
Responsiblities are to manage the collection of nodes
with the option of events. The nodes are maintained in
the order added, allowing the designer to better
organize the System Tree.
Unfortunately this class has the additional responsibility
of handling the PartUser optional interface. This may be
done differently in different cores, especially if a
cell lifecycle part is present.
-
CellStd()
-
-
appendNode(Node)
- Appends the node after the last index.
-
enumerateNodeNames()
- Returns an Enumeration of all node names in the cell, in order.
-
findPart(String)
- Finds and returns the named part.
-
getCellNode()
- Returns the node this cell is in.
-
getNode(String)
- Returns the named node in this cell or null if not found.
-
getNodeCount()
- Returns the number of nodes in the cell.
-
getPart(String)
- Returns the named part in the cell.
-
insertNodeBefore(Node, Node)
- Inserts the node before the nodeBefore, which must be in
the Cell.
-
removeAll()
- Removes all nodes from the Cell.
-
removeNode(Node)
- Removes the node.
-
replicate()
- Returns a copy of itself without mission state.
-
setNode(Node)
- Sets the node the part is in.
CellStd
public CellStd()
appendNode
public void appendNode(Node node)
- Appends the node after the last index. Throws an
IllegalStateException if the node has a duplicate name.
- Parameters:
- node - the node to append.
insertNodeBefore
public void insertNodeBefore(Node node,
Node nodeBefore)
- Inserts the node before the nodeBefore, which must be in
the Cell. Throws an IllegalStateException if the nodeBefore
is not found or the node has a duplicate name.
- Parameters:
- node - the node to insert.
- nodeBefore - the node to insert before.
removeAll
public void removeAll()
- Removes all nodes from the Cell.
removeNode
public Node removeNode(Node node)
- Removes the node. Returns the node removed or null if none.
- Parameters:
- node - the node to remove.
getNodeCount
public int getNodeCount()
- Returns the number of nodes in the cell. We use the
Bean Spec method name style rather than size().
- Returns:
- the number of nodes in the cell.
enumerateNodeNames
public Enumeration enumerateNodeNames()
- Returns an Enumeration of all node names in the cell, in order.
- Returns:
- the node names in thr cell.
getNode
public Node getNode(String name)
- Returns the named node in this cell or null if not found.
- Parameters:
- nodeName - the name of the node to retrieve.
- Returns:
- the node with the nodeName or null if not found..
getCellNode
public Node getCellNode()
- Returns the node this cell is in.
- Returns:
- the node this cell is in.
getPart
public Object getPart(String nodeName)
- Returns the named part in the cell.
See full documentation.
- Parameters:
- partName - the name of the part to retrieve.
- Returns:
- the part with the partName or null if not found.
findPart
public Object findPart(String partName)
- Finds and returns the named part.
See full documentation.
- Parameters:
- partName - the name of the part to find.
- Returns:
- the part with the partName.
setNode
public void setNode(Node node)
- Sets the node the part is in.
replicate
public Object replicate()
- Returns a copy of itself without mission state.
All Packages Class Hierarchy This Package Previous Next Index