org.weborganic.berlioz.util
Class Pair<T,V>
java.lang.Object
org.weborganic.berlioz.util.Pair<T,V>
- Type Parameters:
T
- The type of the first constituent of the keyV
- The type of the second constituent of the key
public class Pair<T,V>
- extends Object
An implementation of an object that can be used as a fast key made of two objects for lookup in
sets and map.
This is an immutable object.
- Since:
- Berlioz 0.8.2
- Version:
- Berlioz 0.8.2 - 29 June 2011
- Author:
- Christophe Lauret
Constructor Summary |
Pair(T a,
V b)
Creates a new scoped path. |
Pair
public Pair(T a,
V b)
- Creates a new scoped path.
- Parameters:
a
- The first constituent of the keyb
- The second constituent of the key
equals
public final boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public final int hashCode()
- Overrides:
hashCode
in class Object
first
public final T first()
- Returns:
- The first constituent of the key.
second
public final V second()
- Returns:
- The second constituent of the key.