| Modifier and Type | Field and Description |
|---|---|
| private static final Pair | |
| private final L | |
| private final R |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <L, R> Pair | Returns: the constructed pair or an empty pair if both inputs are null.Constructs a pair with its left value being |
| public static <L, R> Pair | Returns: the constructed pair or an empty pair ifleft is null.Constructs a pair with its left value being |
| public static <L, R> Pair | Returns: the constructed pair or an empty pair ifright is null.Constructs a pair with its right value being |
| public static <L, R> Pair | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public L | |
| public R | |
| public int | |
| public String |
| EMPTY | back to summary |
|---|---|
| private static final Pair<Object, Object> EMPTY | |
| left | back to summary |
|---|---|
| private final L left | |
| right | back to summary |
|---|---|
| private final R right | |
| Pair | back to summary |
|---|---|
| private Pair(L left, R right) | |
| create | back to summary |
|---|---|
| public static <L, R> Pair Constructs a pair with its left value being
| |
| createLeft | back to summary |
|---|---|
| public static <L, R> Pair Constructs a pair with its left value being
| |
| createRight | back to summary |
|---|---|
| public static <L, R> Pair Constructs a pair with its right value being
| |
| empty | back to summary |
|---|---|
| public static <L, R> Pair Returns an empty pair.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getLeft | back to summary |
|---|---|
| public L getLeft() Returns the left value of this pair.
| |
| getRight | back to summary |
|---|---|
| public R getRight() Returns the right value of this pair.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |