public class Pair<F,S>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
F |
first
The first element.
|
S |
second
The second element.
|
Constructor and Description |
---|
Pair()
Default constructor.
|
Pair(F f,
S s)
Constructs a new pair given its first and second elements.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Tests this pair for equality to an object.
|
int |
hashCode()
Computes a hashcode for this pair.
|
java.lang.String |
toString()
Textual representation.
|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to test for equality with.true
if this
is equal to
o
, false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object