public class GraphEdge extends GraphElement implements Edge, java.lang.Comparable<GraphEdge>
DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE, SECONDARY_EDGE| Constructor and Description |
|---|
GraphEdge() |
GraphEdge(Node source,
Node target,
int type) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Resets the graph element.
|
int |
compareTo(GraphEdge that) |
boolean |
equals(java.lang.Object obj) |
Node |
getSource()
Returns the source node of the edge.
|
Node |
getTarget()
Returns the target node of the edge.
|
int |
getType()
Returns the edge type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE).
|
int |
hashCode() |
void |
setEdge(Node source,
Node target,
int type)
Sets the edge with a source node, a target node and a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE
or SECONDARY_EDGE).
|
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, waitaddLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraphpublic GraphEdge()
public GraphEdge(Node source, Node target, int type) throws MaltChainedException
MaltChainedExceptionpublic void setEdge(Node source, Node target, int type) throws MaltChainedException
setEdge in interface Edgesource - a source nodetarget - a target nodetype - a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE)MaltChainedExceptionpublic void clear() throws MaltChainedException
GraphElementclear in interface Elementclear in class GraphElementMaltChainedExceptionpublic int getType()
public int compareTo(GraphEdge that)
compareTo in interface java.lang.Comparable<GraphEdge>public 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.