de.jstacs.utils
Class Pair<E1,E2>

java.lang.Object
  extended by de.jstacs.utils.Pair<E1,E2>
Type Parameters:
E1 - the type of the first element
E2 - the type of the second element

public class Pair<E1,E2>
extends Object

A very simple container.

Author:
Jens Keilwagen

Constructor Summary
Pair(E1 element1, E2 element2)
          This constructor creates a pair of element1 and element2.
 
Method Summary
 E1 getFirstElement()
          This method returns the first element.
 E2 getSecondElement()
          This method returns the second element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(E1 element1,
            E2 element2)
This constructor creates a pair of element1 and element2.

Parameters:
element1 - the first element
element2 - the second element
Method Detail

getFirstElement

public E1 getFirstElement()
This method returns the first element.

Returns:
the first element

getSecondElement

public E2 getSecondElement()
This method returns the second element.

Returns:
the second element