org.jgrapht.util
Class VertexPair<V>

java.lang.Object
  extended by org.jgrapht.util.VertexPair<V>

public class VertexPair<V>
extends java.lang.Object

Representation of a pair of vertices; to be replaced by Pair if Sun ever gets around to adding Pair to java.util.

Author:
Soren

Constructor Summary
VertexPair(V n1, V n2)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 V getFirst()
           
 V getOther(V one)
           
 V getSecond()
           
 int hashCode()
           
 boolean hasVertex(V v)
          Assess if this pair contains the vertex.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VertexPair

public VertexPair(V n1,
                  V n2)
Method Detail

getFirst

public V getFirst()

getSecond

public V getSecond()

hasVertex

public boolean hasVertex(V v)
Assess if this pair contains the vertex.

Parameters:
v - The vertex in question
Returns:
true if contains, false otherwise

getOther

public V getOther(V one)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object