org.sbml.jsbml.util
public class Pair<L,V> extends java.lang.Object implements java.lang.Cloneable, java.util.Map.Entry<L,V>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private L |
l
Left value.
|
private static long |
serialVersionUID
Generated serial version identifier.
|
private V |
v
Right value.
|
Constructor and Description |
---|
Pair() |
Pair(L l,
V v) |
Pair(Pair<L,V> pair) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
clone() |
boolean |
equals(java.lang.Object object) |
L |
getKey() |
V |
getValue() |
int |
hashCode() |
boolean |
isSetKey() |
boolean |
isSetValue() |
static <L,V> Pair<L,V> |
of(L left,
V right)
Static method to easily create a value pair of two given values.
|
static <L,V> Pair<L,V> |
pairOf(L left,
V right)
Can be used for static import in your class to easily create
Pair s
of arbitrary data types with a simple method call, e.g.,
pairOf(1, 2) . |
L |
setKey(L l) |
V |
setValue(V value) |
java.lang.String |
toString() |
private static final long serialVersionUID
private L l
private V v
public static <L,V> Pair<L,V> of(L left, V right)
left
- right
- public static <L,V> Pair<L,V> pairOf(L left, V right)
Pair
s
of arbitrary data types with a simple method call, e.g.,
pairOf(1, 2)
. This means, you can use
import static org.sbml.jsbml.util.Pair.pairOf
left
- right
- public int hashCode()
public boolean equals(java.lang.Object object)
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public boolean isSetKey()
public boolean isSetValue()
public java.lang.String toString()
toString
in class java.lang.Object