Class VertexPair<V>

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

public class VertexPair<V> extends Object
Representation of a pair of vertices; to be replaced by Pairinvalid input: '<'V,V> if Sun ever gets around to adding Pair to java.util.
Author:
Soren invalid input: '<'soren@tanesha.net>
  • Constructor Details

    • VertexPair

      public VertexPair(V n1, V n2)
  • Method Details

    • 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 String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object