JAPI 0_6-alpha-2
Yet another Java API
API Documentation

net.sf.japi.util
Class Pair<T1,T2>

java.lang.Object
  extended by net.sf.japi.util.Pair<T1,T2>

public class Pair<T1,T2>
extends Object

Lightweight class for data pairs. The hashcode of a pair is the combined hashcode of its values.

Author:
Christian Hujer

Constructor Summary
Pair(T1 first, T2 second)
          Create a Pair.
 
Method Summary
 boolean equals(Object obj)
          
 T1 getFirst()
          Get first member of this pair.
 T2 getSecond()
          Get second member of this pair.
 int hashCode()
          
 
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)
Create a Pair.

Parameters:
first - First data element
second - Second data element
Method Detail

getFirst

public T1 getFirst()
Get first member of this pair.

Returns:
first member of this pair

getSecond

public T2 getSecond()
Get second member of this pair.

Returns:
second member of this pair

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright