mima.domain
Class SubNode
java.lang.Object
mima.domain.Node
mima.domain.SubNode
public class SubNode
- extends Node
INV: Invariant from super class
INV: getSubNodes() != null
- Author:
- Virginio Carfagno
Nested classes/interfaces inherited from class mima.domain.Node |
Node.Frame |
Methods inherited from class mima.domain.Node |
add, checkNotNull, deregisterObserver, expand, expandAll, getFrame, getLink, getNote, getSubNodesCount, getTitle, hasLink, hasNote, hasSubNode, hasSubNodes, isExpanded, isRegisteredObserver, registerObserver, remove, setFrame, setLink, setNote, setTitle, toggleExpansion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_FRAME
private static final Node.Frame DEFAULT_FRAME
DEFAULT_TITLE
private static final java.lang.String DEFAULT_TITLE
- See Also:
- Constant Field Values
_subNodes
private java.util.Collection _subNodes
_superNode
private Node _superNode
SubNode
public SubNode(Node superNode)
doAdd
protected void doAdd(SubNode subNode)
- Specified by:
doAdd
in class Node
doRemove
protected void doRemove(SubNode subNode)
- Specified by:
doRemove
in class Node
getSubNodes
public java.util.Collection getSubNodes()
- This method doesn't return
_subNodes
directly to ensure
the encapsulation and consistency of this object. A manipulation to the returned
Collection
doesn't have any effects on this object. To add
or remove a SubNode
to this node you should use the method
setSuperNode(Node)
or removeFromSuperNode()
from SubNode
.
- Specified by:
getSubNodes
in class Node
getSuperNode
public Node getSuperNode()
invariant
protected void invariant()
- Overrides:
invariant
in class Node
isRight
public boolean isRight()
isRight
protected boolean isRight(SubNode subNode)
- Specified by:
isRight
in class Node
removeFromSuperNode
public void removeFromSuperNode()
- POST: getSuperNode() == null;
setSuperNode
public void setSuperNode(Node superNode)
- POST:
getSuperNode() == superNode