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, setBelongsToGraph
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph
public GraphEdge()
public GraphEdge(Node source, Node target, int type) throws MaltChainedException
MaltChainedException
public void setEdge(Node source, Node target, int type) throws MaltChainedException
setEdge
in interface Edge
source
- a source nodetarget
- a target nodetype
- a type (DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE or SECONDARY_EDGE)MaltChainedException
public void clear() throws MaltChainedException
GraphElement
clear
in interface Element
clear
in class GraphElement
MaltChainedException
public int getType()
public int compareTo(GraphEdge that)
compareTo
in interface java.lang.Comparable<GraphEdge>
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.