org.biojava.bio.structure.quaternary
Class OrderedPair<T>

java.lang.Object
  extended by org.biojava.bio.structure.quaternary.OrderedPair<T>
Type Parameters:
T -

public class OrderedPair<T>
extends java.lang.Object

An ordered pair represents a component of a cartesian product. The cartesian product of two sets A and B is the set of all ordered pairs of the elements of both sets. See http://en.wikipedia.org/wiki/Cartesian_product for more details. Example: A = {1, 2, 3} B = {4, 5} The ordered pairs are {1, 4}, {1, 5}, {2, 4}, .., {3, 5}

Author:
Peter Rose

Method Summary
 T getElement1()
           
 T getElement2()
           
 void setElement1(T element1)
          Sets the first element of an ordered pair.
 void setElement2(T element2)
          Sets the second element of an ordered pair.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getElement1

public T getElement1()
Returns:
element1 the first element of an ordered pair

setElement1

public void setElement1(T element1)
Sets the first element of an ordered pair.

Parameters:
element1 - the first element of an ordered pair

getElement2

public T getElement2()
Returns:
element2 the second element of an ordered pair

setElement2

public void setElement2(T element2)
Sets the second element of an ordered pair.

Parameters:
element2 - the second element of an ordered pair

toString

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