com.metsci.glimpse.util
Class Pair<A,B>
java.lang.Object
com.metsci.glimpse.util.Pair<A,B>
- All Implemented Interfaces:
- java.io.Serializable
public class Pair<A,B>
- extends java.lang.Object
- implements java.io.Serializable
A generic class for pairs of objects.
- Author:
- hogye
- See Also:
- Serialized Form
Constructor Summary |
Pair(A first,
B second)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Pair
public Pair(A first,
B second)
newPair
public static <A,B> Pair<A,B> newPair(A first,
B second)
first
public A first()
- Returns:
- The first element of the pair
second
public B second()
- Returns:
- The second element of the pair
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
Copyright © 2012 Metron, Inc.. All Rights Reserved.