net.sf.eos.util
Class Pair<F,S>

java.lang.Object
  extended by net.sf.eos.util.Pair<F,S>
Type Parameters:
F - the type of the first value
S - the type of the second value

public final class Pair<F,S>
extends Object

A class to store a pair of generic types. Use with care as keys in maps.

Since:
0.1.0
Author:
Sascha Kohlmann

Constructor Summary
Pair(F first, S second)
          Creates a new pair.
 
Method Summary
 boolean equals(Object other)
          
 F getFirst()
          Returns the first value of the pair.
 S getSecond()
          Returns the second value of the pair.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(@Nullable
            F first,
            @Nullable
            S second)
Creates a new pair.

Parameters:
first - the first value of this pair
second - the second value of this pair
Method Detail

getFirst

public F getFirst()
Returns the first value of the pair.

Returns:
the first value of the pair

getSecond

public S getSecond()
Returns the second value of the pair.

Returns:
the second value of the pair

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(@Nullable
                      Object other)

Overrides:
equals in class Object


Copyright © 2008. All Rights Reserved.