N
- first value typeV
- second value typepublic class Pair<N,V> extends Object implements Serializable
Pair class.
Constructor and Description |
---|
Pair()
Constructor for Pair.
|
Pair(N first, V second)
Constructor for Pair.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
N |
getFirst()
Getter for the field
first . |
V |
getSecond()
Getter for the field
second . |
int |
hashCode() |
void |
setFirst(N first)
Setter for the field
first . |
void |
setSecond(V second)
Setter for the field
second . |
String |
toString() |
public N getFirst()
Getter for the field first
.
public void setFirst(N first)
Setter for the field first
.
first
- a N object.public V getSecond()
Getter for the field second
.
public void setSecond(V second)
Setter for the field second
.
second
- a V object.Copyright © 2015 Oracle and/or its affiliates. All rights reserved.