T
- Class for the First element of the PairP
- Class for the Last element of the Pairpublic class Pair<T,P>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object ob) |
T |
getFirst()
Getter method for the first element
|
P |
getLast()
Getter method for the last element
|
int |
hashCode() |
void |
setFirst(T first)
Setter method for the first element
|
void |
setLast(P last)
Setter method for the last element
|
java.lang.String |
toString() |
public T getFirst()
public void setFirst(T first)
first
- T object which will be the First element of this Pair. It could be null.public P getLast()
public void setLast(P last)
last
- P object which will be the Last element of this Pair. It could be null.public boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object