DAT
Class Pair

java.lang.Object
  extended by DAT.Pair

public class Pair
extends java.lang.Object

A pair (2-tuple) of information.


Field Summary
 java.lang.Object item1
          the first item (or domain item)
 java.lang.Object item2
          the second item (or codomain item)
 
Constructor Summary
Pair(java.lang.Object i1, java.lang.Object i2)
          create a new pair
 
Method Summary
 boolean equals(java.lang.Object o)
          determine whether this pair is the same as the object passed checks that both items are the same using the items' equals methods
 java.lang.String toString()
          generate a string representation of the pair of the form < item1 , item2 >
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

item1

public java.lang.Object item1
the first item (or domain item)


item2

public java.lang.Object item2
the second item (or codomain item)

Constructor Detail

Pair

public Pair(java.lang.Object i1,
            java.lang.Object i2)
create a new pair

Parameters:
i1 - the first item
i2 - the second item
Method Detail

equals

public boolean equals(java.lang.Object o)
determine whether this pair is the same as the object passed checks that both items are the same using the items' equals methods

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to be compared
Returns:
true if the pairs are the same, false otherwise

toString

public java.lang.String toString()
generate a string representation of the pair of the form < item1 , item2 >

Overrides:
toString in class java.lang.Object
Returns:
the string generated