public abstract class GraphNode extends GraphElement implements Node
| Modifier and Type | Field and Description |
|---|---|
protected java.util.SortedSet<Edge> |
incomingEdges |
protected java.util.SortedSet<Edge> |
outgoingEdges |
| Constructor and Description |
|---|
GraphNode() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncomingEdge(Edge in) |
void |
addOutgoingEdge(Edge out) |
void |
clear()
Resets the graph element.
|
int |
compareTo(ComparableNode o) |
boolean |
equals(java.lang.Object obj) |
java.util.Iterator<Edge> |
getIncomingEdgeIterator() |
java.util.SortedSet<Edge> |
getIncomingSecondaryEdges()
Returns a sorted set of incoming secondary edges.
|
int |
getInDegree()
Returns the in degree of the node (number of incoming edges of all types of edges).
|
abstract int |
getIndex()
Returns the index of the node.
|
int |
getLeftmostDescendantIndex()
Returns the index of the left-most terminal descendant node.
|
int |
getLeftmostProperDescendantIndex()
Returns the index of the left-most proper terminal descendant node (excluding itself).
|
int |
getOutDegree()
Returns the out degree of the node (number of outgoing edges of all types of edges).
|
java.util.Iterator<Edge> |
getOutgoingEdgeIterator() |
java.util.SortedSet<Edge> |
getOutgoingSecondaryEdges()
Returns a sorted set of outgoing secondary edges.
|
int |
getRightmostDescendantIndex()
Returns the index of the right-most terminal descendant node.
|
int |
getRightmostProperDescendantIndex()
Returns the index of the right-most proper terminal descendant node (excluding itself).
|
int |
hashCode() |
abstract boolean |
isRoot()
Returns true if the node is a root node, otherwise false.
|
void |
removeIncomingEdge(Edge in) |
void |
removeOutgoingEdge(Edge out) |
abstract void |
setIndex(int index) |
java.lang.String |
toString() |
addLabel, addLabel, addLabel, compareTo, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraphaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCompareToIndex, getLeftmostDescendant, getLeftmostProperDescendant, getRightmostDescendant, getRightmostProperDescendantaddLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraphprotected java.util.SortedSet<Edge> incomingEdges
protected java.util.SortedSet<Edge> outgoingEdges
public GraphNode() throws MaltChainedException
MaltChainedExceptionpublic void addIncomingEdge(Edge in) throws MaltChainedException
addIncomingEdge in interface NodeMaltChainedExceptionpublic void addOutgoingEdge(Edge out) throws MaltChainedException
addOutgoingEdge in interface NodeMaltChainedExceptionpublic void removeIncomingEdge(Edge in) throws MaltChainedException
removeIncomingEdge in interface NodeMaltChainedExceptionpublic void removeOutgoingEdge(Edge out) throws MaltChainedException
removeOutgoingEdge in interface NodeMaltChainedExceptionpublic int getLeftmostProperDescendantIndex() throws MaltChainedException
ComparableNodegetLeftmostProperDescendantIndex in interface ComparableNodeMaltChainedExceptionpublic int getRightmostProperDescendantIndex() throws MaltChainedException
ComparableNodegetRightmostProperDescendantIndex in interface ComparableNodeMaltChainedExceptionpublic int getLeftmostDescendantIndex() throws MaltChainedException
ComparableNodegetLeftmostDescendantIndex in interface ComparableNodeMaltChainedExceptionpublic int getRightmostDescendantIndex() throws MaltChainedException
ComparableNodegetRightmostDescendantIndex in interface ComparableNodeMaltChainedExceptionpublic java.util.Iterator<Edge> getIncomingEdgeIterator()
getIncomingEdgeIterator in interface Nodepublic java.util.Iterator<Edge> getOutgoingEdgeIterator()
getOutgoingEdgeIterator in interface Nodepublic void clear() throws MaltChainedException
GraphElementclear in interface Elementclear in class GraphElementMaltChainedExceptionpublic int getInDegree()
ComparableNodegetInDegree in interface ComparableNodepublic int getOutDegree()
ComparableNodegetOutDegree in interface ComparableNodepublic java.util.SortedSet<Edge> getIncomingSecondaryEdges()
ComparableNodegetIncomingSecondaryEdges in interface ComparableNodepublic java.util.SortedSet<Edge> getOutgoingSecondaryEdges()
ComparableNodegetOutgoingSecondaryEdges in interface ComparableNodepublic int compareTo(ComparableNode o)
compareTo in interface java.lang.Comparable<ComparableNode>public abstract int getIndex()
ComparableNodegetIndex in interface ComparableNodepublic abstract void setIndex(int index) throws MaltChainedException
setIndex in interface NodeMaltChainedExceptionpublic abstract boolean isRoot()
ComparableNodeisRoot in interface ComparableNodepublic boolean equals(java.lang.Object obj)
equals in class GraphElementpublic int hashCode()
hashCode in class GraphElementpublic java.lang.String toString()
toString in class GraphElementCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.