Package com.yahoo.collections
Class Pair<F,S>
- java.lang.Object
-
- com.yahoo.collections.Pair<F,S>
-
public class Pair<F,S> extends java.lang.Object
An immutable pair of objects. This implements equals and hashCode by delegating to the pair objects.- Author:
- bratseth
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
F
getFirst()
Returns the first member.S
getSecond()
Returns the second member.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getFirst
public F getFirst()
Returns the first member. This may be null.
-
getSecond
public S getSecond()
Returns the second member. This may be null.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-