scpsolver.graph
Class Edge

java.lang.Object
  extended by scpsolver.graph.Edge
Direct Known Subclasses:
ColoredEdge

public class Edge
extends java.lang.Object

Author:
planatsc

Constructor Summary
Edge(Node node1, Node node2)
           
 
Method Summary
 boolean equals(Edge e)
          equals method checking for the node labels.
 java.lang.String getLabel()
           
 Node getNode1()
           
 Node getNode2()
           
 java.lang.String[] getNodeLabels()
          returns both node labels in an array, typographically sorted
 java.util.Hashtable<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getProperty(java.lang.String key)
           
 int getWeight()
           
 boolean isActive()
           
 void removeEdge()
           
 void setActive(boolean active)
           
 void setLabel(java.lang.String label)
           
 void setNode1(Node node1)
           
 void setNode2(Node node2)
           
 void setProperties(java.util.Hashtable<java.lang.String,java.lang.String> properties)
           
 void setProperty(java.lang.String key, java.lang.String value)
           
 void setWeight(int weight)
           
 java.lang.String toNormalizedString()
          returns a string representation of the edge, independent of the edge direction
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edge

public Edge(Node node1,
            Node node2)
Method Detail

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: