scpsolver.graph
Class Edge
java.lang.Object
scpsolver.graph.Edge
- Direct Known Subclasses:
- ColoredEdge
public class Edge
- extends java.lang.Object
- Author:
- planatsc
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Edge
public Edge(Node node1,
Node node2)
setProperty
public void setProperty(java.lang.String key,
java.lang.String value)
getProperty
public java.lang.String getProperty(java.lang.String key)
getProperties
public java.util.Hashtable<java.lang.String,java.lang.String> getProperties()
setProperties
public void setProperties(java.util.Hashtable<java.lang.String,java.lang.String> properties)
getWeight
public int getWeight()
setWeight
public void setWeight(int weight)
getLabel
public java.lang.String getLabel()
- Returns:
setLabel
public void setLabel(java.lang.String label)
- Parameters:
label
-
isActive
public boolean isActive()
- Returns:
- the active
setActive
public void setActive(boolean active)
- Parameters:
active
- the active to set
getNode1
public Node getNode1()
- Returns:
- the node1
setNode1
public void setNode1(Node node1)
- Parameters:
node1
- the node1 to set
getNode2
public Node getNode2()
- Returns:
- the node2
setNode2
public void setNode2(Node node2)
- Parameters:
node2
- the node2 to set
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
removeEdge
public void removeEdge()
equals
public boolean equals(Edge e)
- equals method checking for the node labels.
the edges are uniquely defined by their nodes label in the graph.
- Parameters:
n
-
- Returns:
getNodeLabels
public java.lang.String[] getNodeLabels()
- returns both node labels in an array, typographically sorted
- Returns:
toNormalizedString
public java.lang.String toNormalizedString()
- returns a string representation of the edge, independent of the edge direction
- Returns: