Added get methods for the values stored in the pair.
This commit is contained in:
@@ -86,4 +86,20 @@ public class Pair<S, T> implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "(" + head.toString() + "," + tail.toString() + ")";
|
return "(" + head.toString() + "," + tail.toString() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param head
|
||||||
|
*/
|
||||||
|
public void setHead(S head) {
|
||||||
|
this.head = head;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param tail
|
||||||
|
*/
|
||||||
|
public void setTail(T tail) {
|
||||||
|
this.tail = tail;
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user