util
Class Pair<ObjType>

java.lang.Object
  extended by util.Pair<ObjType>

public class Pair<ObjType>
extends java.lang.Object

This class allows storing pairs of objects as a single entity.


Constructor Summary
Pair(ObjType first_entry, ObjType second_entry)
          Constructor for a pair representation of objects of the same type.
 
Method Summary
 ObjType get_first_entry()
          Get the first entry of the pair.
 ObjType get_second_entry()
          Get the second entry of the pair.
 void Print()
          Print a string representation of the contents of the pair.
 void set_first_entry(ObjType first_entry)
          Set the first entry of the pair.
 void set_second_entry(ObjType second_entry)
          Get the second entry of the pair.
 java.lang.String toString()
          Generate a string representation of the contents of the pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(ObjType first_entry,
            ObjType second_entry)
Constructor for a pair representation of objects of the same type.

Parameters:
first_entry - the first of the two objects.
second_entry - the first of the two objects.
Method Detail

get_first_entry

public ObjType get_first_entry()
Get the first entry of the pair.

Returns:
the reference to the first entry.

set_first_entry

public void set_first_entry(ObjType first_entry)
Set the first entry of the pair.

Parameters:
first_entry - the first of the two objects.

get_second_entry

public ObjType get_second_entry()
Get the second entry of the pair.

Returns:
the reference to the second entry.

set_second_entry

public void set_second_entry(ObjType second_entry)
Get the second entry of the pair.

Parameters:
second_entry - the second of the two objects.

toString

public java.lang.String toString()
Generate a string representation of the contents of the pair.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the Pair.

Print

public void Print()
Print a string representation of the contents of the pair.