public class Pair<L,R> extends Object
Constructor and Description |
---|
Pair(L left,
R right)
Creates an instance of pair with a "left" value and a "right" value.
|
Modifier and Type | Method and Description |
---|---|
static <A,B> Pair<A,B> |
create(A left,
B right)
Creates an instance of pair with a "left" value and a "right" value.
|
static boolean |
equal(Object o1,
Object o2)
Determines if one object equals another.
|
boolean |
equals(Object o)
Determines if one object equals another.
|
L |
getLeft()
Returns the "left" element of the pair.
|
R |
getRight()
Returns the "right" element of the pair.
|
int |
hashCode()
Returns the hash code.
|
void |
setLeft(L value)
Set the "left" element of the pair.
|
void |
setRight(R value)
Sets the "right" element of the pair.
|
public static <A,B> Pair<A,B> create(A left, B right)
public R getRight()
public L getLeft()
public void setRight(R value)
value
- the value to set the element.public void setLeft(L value)
value
- the value to set the element.public final boolean equals(Object o)
public static final boolean equal(Object o1, Object o2)
true
if the content is the same;
false
otherwise.Copyright © 2008-2015 Regents University of California. All Rights Reserved.