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.


Constructor Index

 o CellStd()

Method Index

 o appendNode(Node)
Appends the node after the last index.
 o enumerateNodeNames()
Returns an Enumeration of all node names in the cell, in order.
 o findPart(String)
Finds and returns the named part.
 o getCellNode()
Returns the node this cell is in.
 o getNode(String)
Returns the named node in this cell or null if not found.
 o getNodeCount()
Returns the number of nodes in the cell.
 o getPart(String)
Returns the named part in the cell.
 o insertNodeBefore(Node, Node)
Inserts the node before the nodeBefore, which must be in the Cell.
 o removeAll()
Removes all nodes from the Cell.
 o removeNode(Node)
Removes the node.
 o replicate()
Returns a copy of itself without mission state.
 o setNode(Node)
Sets the node the part is in.

Constructors

 o CellStd
 public CellStd()

Methods

 o 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.
 o 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.
 o removeAll
 public void removeAll()
Removes all nodes from the Cell.

 o removeNode
 public Node removeNode(Node node)
Removes the node. Returns the node removed or null if none.

Parameters:
node - the node to remove.
 o 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.
 o enumerateNodeNames
 public Enumeration enumerateNodeNames()
Returns an Enumeration of all node names in the cell, in order.

Returns:
the node names in thr cell.
 o 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..
 o getCellNode
 public Node getCellNode()
Returns the node this cell is in.

Returns:
the node this cell is in.
 o 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.
 o 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.
 o setNode
 public void setNode(Node node)
Sets the node the part is in.

 o replicate
 public Object replicate()
Returns a copy of itself without mission state.


All Packages  Class Hierarchy  This Package  Previous  Next  Index