pl.edu.agh.cast.common.collections
Class Pair<T1,T2>

java.lang.Object
  extended by pl.edu.agh.cast.common.collections.Pair<T1,T2>
Type Parameters:
T1 - type of first object
T2 - type of second object
Direct Known Subclasses:
UniformPair

public class Pair<T1,T2>
extends Object

A class for representing a pair of objects.

Author:
AGH CAST Team

Constructor Summary
Pair(T1 first, T2 second)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          
 T1 getFirst()
           
 T2 getSecond()
           
 int hashCode()
          
protected  void setFirst(T1 first)
           
protected  void setSecond(T2 second)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(T1 first,
            T2 second)
Constructor.

Parameters:
first - first object
second - second object
Method Detail

getFirst

public final T1 getFirst()

setFirst

protected final void setFirst(T1 first)

getSecond

public final T2 getSecond()

setSecond

protected final void setSecond(T2 second)

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.