edu.berkeley.nlp.lm.util
Class Pair<F,S>

java.lang.Object
  extended by edu.berkeley.nlp.lm.util.Pair<F,S>
All Implemented Interfaces:
Serializable

public class Pair<F,S>
extends Object
implements Serializable

A generic-typed pair of objects.

Author:
Dan Klein
See Also:
Serialized Form

Constructor Summary
Pair(F first, S second)
           
 
Method Summary
 F getFirst()
           
 S getSecond()
           
static
<S,T> Pair<S,T>
newPair(S first, T second)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(F first,
            S second)
Method Detail

getFirst

public F getFirst()

getSecond

public S getSecond()

toString

public String toString()
Overrides:
toString in class Object

newPair

public static <S,T> Pair<S,T> newPair(S first,
                                      T second)