util
Class UnorderedPair<A>

java.lang.Object
  extended by util.Pair<A,A>
      extended by util.UnorderedPair<A>
Type Parameters:
A - Type of both components
Direct Known Subclasses:
ObjectUndirectedEdge

public class UnorderedPair<A>
extends Pair<A,A>

Unordered pair type. (a, b) == (b, a)


Field Summary
 
Fields inherited from class util.Pair
first, second
 
Constructor Summary
UnorderedPair(A first, A second)
          Creates an unordered pair with the specified components.
 
Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class util.Pair
equals, getFirst, getSecond
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnorderedPair

public UnorderedPair(A first,
                     A second)
Creates an unordered pair with the specified components.

Parameters:
first - the first component
second - the second component
Method Detail

toString

public String toString()
Overrides:
toString in class Pair<A,A>

equals

public boolean equals(Object other)
Overrides:
equals in class Pair<A,A>

hashCode

public int hashCode()
Overrides:
hashCode in class Pair<A,A>