|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ed.inf.graph.compound.base.BaseCompoundNode
public abstract class BaseCompoundNode
Constructor Summary | |
---|---|
protected |
BaseCompoundNode()
|
Method Summary | |
---|---|
(package private) void |
addInEdge(BaseCompoundEdge edge)
|
(package private) void |
addOutEdge(BaseCompoundEdge edge)
|
java.util.Iterator<BaseCompoundNode> |
ancestorIterator()
Iterator that traverses directly from this node up to the root node. |
java.util.Iterator<BaseCompoundNode> |
childIterator()
Iterator over the immediate children of this node. |
int |
compareTo(BaseCompoundNode o)
Compare this node to another node. |
java.util.Iterator<BaseCompoundNode> |
connectedNodeIterator()
Provides an iterator that lists all nodes connected to this node via another edge. |
protected void |
createInEdgeSet(IDirectedEdgeSet<BaseCompoundNode,BaseCompoundEdge> edgeSet)
|
protected void |
createOutEdgeSet(IDirectedEdgeSet<BaseCompoundNode,BaseCompoundEdge> edgeSet)
|
java.util.Iterator<BaseCompoundEdge> |
edgeIterator()
Provides an iterator that lists all edges associated with this node. |
abstract BaseChildCompoundGraph |
getChildCompoundGraph()
Get subgraph of this compound node. |
int |
getDegree()
Get the degree of the this node. |
protected IFilteredEdgeSet<BaseCompoundNode,BaseCompoundEdge> |
getEdgeInList()
|
protected IFilteredEdgeSet<BaseCompoundNode,BaseCompoundEdge> |
getEdgeOutList()
|
java.util.SortedSet<BaseCompoundEdge> |
getEdgesWith(BaseCompoundNode other)
Gets the edges shared with the other node. |
abstract BaseCompoundGraph |
getGraph()
Get the graph that owns this node. |
int |
getInDegree()
|
abstract int |
getIndex()
Get the index of this node. |
java.util.Iterator<BaseCompoundEdge> |
getInEdgeIterator()
Gets all edges connecting this node |
java.util.SortedSet<BaseCompoundEdge> |
getInEdgesFrom(BaseCompoundNode outNode)
|
java.util.Iterator<BaseCompoundNode> |
getInNodeIterator()
|
int |
getOutDegree()
|
java.util.Iterator<BaseCompoundEdge> |
getOutEdgeIterator()
Gets all edges going out from this node. |
java.util.SortedSet<BaseCompoundEdge> |
getOutEdgesTo(BaseCompoundNode inNode)
|
java.util.Iterator<BaseCompoundNode> |
getOutNodeIterator()
|
abstract BaseCompoundNode |
getParent()
The parent node cannot be null and should be the root node if the current node is the root node. |
BaseCompoundNode |
getRoot()
Get the root node for the tree that this node belongs to. |
boolean |
hasEdgeWith(BaseCompoundNode other)
Tests whether this node shares one or more edges with another node, irrespective of the direction of that edge. |
boolean |
hasInEdgeFrom(BaseCompoundNode outNode)
Has at least one edge coming into this one from outNode |
boolean |
hasOutEdgeTo(BaseCompoundNode inNode)
Has at least one edge going out from this node to inNode. |
boolean |
isAncestor(BaseCompoundNode testNode)
|
boolean |
isChild(BaseCompoundNode childNode)
Tests if childNode is a child of this node. |
boolean |
isDescendent(BaseCompoundNode testNode)
|
boolean |
isParent(BaseCompoundNode parentNode)
Is the given node the parent node of this one? |
abstract boolean |
isRemoved()
Has the node been removed from the graph? Nodes are not removed from the graph's data structures, but flagged as deleted. |
java.util.Iterator<BaseCompoundNode> |
levelOrderIterator()
Iterator that traverses down the tree in level-order, starting at this node. |
void |
markRemoved(boolean removed)
Used to reset the removal status of a graph edge or node. |
protected abstract void |
removalAction(boolean removed)
additional actions to be executed upon this node being marked as removed. |
protected abstract void |
setRemoved(boolean removed)
This should be used to set the removal status variable only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ed.inf.graph.basic.IBasicNode |
---|
equals, hashCode |
Constructor Detail |
---|
protected BaseCompoundNode()
Method Detail |
---|
public final java.util.Iterator<BaseCompoundNode> childIterator()
ITreeNode
childIterator
in interface ITreeNode<BaseCompoundNode>
public abstract BaseCompoundNode getParent()
getParent
in interface ITreeNode<BaseCompoundNode>
protected final void createInEdgeSet(IDirectedEdgeSet<BaseCompoundNode,BaseCompoundEdge> edgeSet)
protected final void createOutEdgeSet(IDirectedEdgeSet<BaseCompoundNode,BaseCompoundEdge> edgeSet)
protected final IFilteredEdgeSet<BaseCompoundNode,BaseCompoundEdge> getEdgeInList()
protected final IFilteredEdgeSet<BaseCompoundNode,BaseCompoundEdge> getEdgeOutList()
protected abstract void setRemoved(boolean removed)
removalAction(boolean)
.
removed
- the removal status: true means the nodes is removed.public abstract BaseChildCompoundGraph getChildCompoundGraph()
ICompoundNode
getChildCompoundGraph
in interface ICompoundNode<BaseCompoundNode,BaseCompoundEdge>
public final int getInDegree()
getInDegree
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.SortedSet<BaseCompoundEdge> getInEdgesFrom(BaseCompoundNode outNode)
getInEdgesFrom
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.Iterator<BaseCompoundEdge> getInEdgeIterator()
IDirectedNode
getInEdgeIterator
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.Iterator<BaseCompoundNode> getInNodeIterator()
getInNodeIterator
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final int getOutDegree()
getOutDegree
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.Iterator<BaseCompoundEdge> getOutEdgeIterator()
IDirectedNode
getOutEdgeIterator
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.SortedSet<BaseCompoundEdge> getOutEdgesTo(BaseCompoundNode inNode)
getOutEdgesTo
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.Iterator<BaseCompoundNode> getOutNodeIterator()
getOutNodeIterator
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final boolean hasInEdgeFrom(BaseCompoundNode outNode)
IDirectedNode
hasInEdgeFrom
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final boolean hasOutEdgeTo(BaseCompoundNode inNode)
IDirectedNode
hasOutEdgeTo
in interface IDirectedNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.Iterator<BaseCompoundNode> connectedNodeIterator()
IBasicNode
connectedNodeIterator
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
public final int getDegree()
IBasicNode
getDegree
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.Iterator<BaseCompoundEdge> edgeIterator()
IBasicNode
edgeIterator
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
public final java.util.SortedSet<BaseCompoundEdge> getEdgesWith(BaseCompoundNode other)
IBasicNode
getEdgesWith
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
other
- The other node to test. Cannot be null.
public abstract BaseCompoundGraph getGraph()
IBasicNode
getGraph
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
public abstract int getIndex()
IBasicNode
getIndex
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
getIndex
in interface ITreeNode<BaseCompoundNode>
public final boolean isChild(BaseCompoundNode childNode)
ITreeNode
childNode
is a child of this node.
isChild
in interface ITreeNode<BaseCompoundNode>
childNode
- The node to test, can be null.
public final boolean hasEdgeWith(BaseCompoundNode other)
IBasicNode
hasEdgeWith
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
other
- The other node to test. Can be null.
final void addInEdge(BaseCompoundEdge edge)
final void addOutEdge(BaseCompoundEdge edge)
public final int compareTo(BaseCompoundNode o)
IBasicNode
compareTo
in interface java.lang.Comparable<BaseCompoundNode>
compareTo
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
o
- the other node to compare to.public abstract boolean isRemoved()
IBasicNode
isRemoved
in interface IBasicNode<BaseCompoundNode,BaseCompoundEdge>
public final void markRemoved(boolean removed)
IRestorableGraphElement
markRemoved
in interface IRestorableGraphElement
protected abstract void removalAction(boolean removed)
public final boolean isParent(BaseCompoundNode parentNode)
ITreeNode
isParent
in interface ITreeNode<BaseCompoundNode>
parentNode
- The node to test as a parent. Can be null.
public BaseCompoundNode getRoot()
ITreeNode
getRoot
in interface ITreeNode<BaseCompoundNode>
public final java.util.Iterator<BaseCompoundNode> ancestorIterator()
ITreeNode
ancestorIterator
in interface ITreeNode<BaseCompoundNode>
public final java.util.Iterator<BaseCompoundNode> levelOrderIterator()
ITreeNode
levelOrderIterator
in interface ITreeNode<BaseCompoundNode>
public boolean isAncestor(BaseCompoundNode testNode)
isAncestor
in interface ICompoundNode<BaseCompoundNode,BaseCompoundEdge>
public boolean isDescendent(BaseCompoundNode testNode)
isDescendent
in interface ICompoundNode<BaseCompoundNode,BaseCompoundEdge>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |