T
- the type of the elements of the pairpublic class AbstractPair<T>
extends java.lang.Object
This class is intended to be subclassed. It is highly recommended that the subclasses provide factory methods.
This class does not put any constraint on the consistency of the values. Also null
is allowed for both.
Related checks are left to the subclases, if desired.
Modifier | Constructor and Description |
---|---|
protected |
AbstractPair(T leftElement,
T rightElement)
A protected class constructor, since instances might only be created using sub classes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
T |
left() |
T |
right() |