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, setBelongsToGraph
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCompareToIndex, getLeftmostDescendant, getLeftmostProperDescendant, getRightmostDescendant, getRightmostProperDescendant
addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph
protected java.util.SortedSet<Edge> incomingEdges
protected java.util.SortedSet<Edge> outgoingEdges
public GraphNode() throws MaltChainedException
MaltChainedException
public void addIncomingEdge(Edge in) throws MaltChainedException
addIncomingEdge
in interface Node
MaltChainedException
public void addOutgoingEdge(Edge out) throws MaltChainedException
addOutgoingEdge
in interface Node
MaltChainedException
public void removeIncomingEdge(Edge in) throws MaltChainedException
removeIncomingEdge
in interface Node
MaltChainedException
public void removeOutgoingEdge(Edge out) throws MaltChainedException
removeOutgoingEdge
in interface Node
MaltChainedException
public int getLeftmostProperDescendantIndex() throws MaltChainedException
ComparableNode
getLeftmostProperDescendantIndex
in interface ComparableNode
MaltChainedException
public int getRightmostProperDescendantIndex() throws MaltChainedException
ComparableNode
getRightmostProperDescendantIndex
in interface ComparableNode
MaltChainedException
public int getLeftmostDescendantIndex() throws MaltChainedException
ComparableNode
getLeftmostDescendantIndex
in interface ComparableNode
MaltChainedException
public int getRightmostDescendantIndex() throws MaltChainedException
ComparableNode
getRightmostDescendantIndex
in interface ComparableNode
MaltChainedException
public java.util.Iterator<Edge> getIncomingEdgeIterator()
getIncomingEdgeIterator
in interface Node
public java.util.Iterator<Edge> getOutgoingEdgeIterator()
getOutgoingEdgeIterator
in interface Node
public void clear() throws MaltChainedException
GraphElement
clear
in interface Element
clear
in class GraphElement
MaltChainedException
public int getInDegree()
ComparableNode
getInDegree
in interface ComparableNode
public int getOutDegree()
ComparableNode
getOutDegree
in interface ComparableNode
public java.util.SortedSet<Edge> getIncomingSecondaryEdges()
ComparableNode
getIncomingSecondaryEdges
in interface ComparableNode
public java.util.SortedSet<Edge> getOutgoingSecondaryEdges()
ComparableNode
getOutgoingSecondaryEdges
in interface ComparableNode
public int compareTo(ComparableNode o)
compareTo
in interface java.lang.Comparable<ComparableNode>
public abstract int getIndex()
ComparableNode
getIndex
in interface ComparableNode
public abstract void setIndex(int index) throws MaltChainedException
setIndex
in interface Node
MaltChainedException
public abstract boolean isRoot()
ComparableNode
isRoot
in interface ComparableNode
public boolean equals(java.lang.Object obj)
equals
in class GraphElement
public int hashCode()
hashCode
in class GraphElement
public java.lang.String toString()
toString
in class GraphElement
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.