mima.domain
Class CentralNode

java.lang.Object
  extended by mima.domain.Node
      extended by 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 Class Summary
 
Nested classes/interfaces inherited from class mima.domain.Node
Node.Frame
 
Field Summary
private  java.util.Collection _leftSubNodes
           
private  java.util.Collection _rightSubNodes
           
private static Node.Frame DEFAULT_FRAME
           
private static java.lang.String DEFAULT_TITLE
           
 
Constructor Summary
CentralNode()
          POST: getTitle() == DEFAULT_TITLE
POST: getFrame() == DEFAULT_FRAME
 
Method Summary
protected  void doAdd(SubNode subNode)
           
protected  void doRemove(SubNode subNode)
           
 java.util.Collection getLeftSubNodes()
          This method doesn't return _leftSubNodes directly to ensure the encapsulation and consistency of this object.
 java.util.Collection getRightSubNodes()
          This method doesn't return _rightSubNodes directly to ensure the encapsulation and consistency of this object.
 java.util.Collection getSubNodes()
          POST: Return value !
protected  void invariant()
           
private  boolean isAddToRightSubNodes()
           
protected  boolean isRight(SubNode subNode)
           
 
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
 

Field Detail

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
Constructor Detail

CentralNode

public CentralNode()
POST: getTitle() == DEFAULT_TITLE
POST: getFrame() == DEFAULT_FRAME

Method Detail

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