All Packages Class Hierarchy This Package Previous Next Index
Interface org.jcon.core.part.Cell
- public interface Cell
- extends NodeUser, Replicatable
This interface 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.
-
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 this cell or null if not found.
-
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.
appendNode
public abstract 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 abstract 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 abstract void removeAll()
- Removes all nodes from the Cell.
removeNode
public abstract Node removeNode(Node node)
- Removes the node. Returns the node removed or null if none.
- Parameters:
- node - the node to remove.
getNodeCount
public abstract 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 abstract Enumeration enumerateNodeNames()
- Returns an Enumeration of all node names in the cell, in order.
- Returns:
- the node names in thr cell.
getNode
public abstract Node getNode(String nodeName)
- 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 abstract Node getCellNode()
- Returns the node this cell is in.
- Returns:
- the node this cell is in.
getPart
public abstract Object getPart(String partName)
- Returns the named part in this cell or null if not found.
- Parameters:
- partName - the name of the part to retrieve.
- Returns:
- the part with the partName or null if not found.
findPart
public abstract 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.
All Packages Class Hierarchy This Package Previous Next Index