mima.domain
Class CentralNode
java.lang.Object
mima.domain.Node
mima.domain.CentralNode
public class CentralNode
- extends Node
INV: Invariant from super class
INV: getLeftSubNodes() != null
INV: getRightSubNodes() != null
INV: getRightSubNodes().size() >= getLeftSubNodes().size()
- Author:
- Virginio Carfagno
Nested classes/interfaces inherited from class mima.domain.Node |
Node.Frame |
Constructor Summary |
CentralNode()
POST: getTitle() == DEFAULT_TITLE
POST: getFrame() == DEFAULT_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
_leftSubNodes
private java.util.Collection _leftSubNodes
_rightSubNodes
private java.util.Collection _rightSubNodes
CentralNode
public CentralNode()
- POST:
getTitle() == DEFAULT_TITLE
POST: getFrame() == DEFAULT_FRAME
doAdd
protected void doAdd(SubNode subNode)
- Specified by:
doAdd
in class Node
doRemove
protected void doRemove(SubNode subNode)
- Specified by:
doRemove
in class Node
getLeftSubNodes
public java.util.Collection getLeftSubNodes()
- This method doesn't return
_leftSubNodes
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
.
getRightSubNodes
public java.util.Collection getRightSubNodes()
- This method doesn't return
_rightSubNodes
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
.
getSubNodes
public java.util.Collection getSubNodes()
- Description copied from class:
Node
- POST: Return value != null
- Specified by:
getSubNodes
in class Node
invariant
protected void invariant()
- Overrides:
invariant
in class Node
isAddToRightSubNodes
private boolean isAddToRightSubNodes()
isRight
protected boolean isRight(SubNode subNode)
- Specified by:
isRight
in class Node