org.sbml.jsbml.util
public class ValuePair<L extends java.lang.Comparable<? super L>,V extends java.lang.Comparable<? super V>> extends Pair<L,V> implements java.lang.Comparable<ValuePair<L,V>>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Generated serial version identifier.
|
Constructor and Description |
---|
ValuePair()
Creates a new
ValuePair with both attributes set to null . |
ValuePair(L l,
V v) |
ValuePair(ValuePair<L,V> valuePair) |
Modifier and Type | Method and Description |
---|---|
ValuePair<L,V> |
clone() |
int |
compareTo(L l,
V v)
Convenient method to compare two values to this
ValuePair . |
int |
compareTo(ValuePair<L,V> v) |
L |
getL() |
V |
getV() |
boolean |
isSetL() |
boolean |
isSetV() |
static <L extends java.lang.Comparable<? super L>,V extends java.lang.Comparable<? super V>> |
of(L left,
V right)
Static method to easily create a value pair of two given values.
|
void |
setL(L l) |
void |
setV(V v) |
static <L extends java.lang.Comparable<? super L>,V extends java.lang.Comparable<? super V>> |
valuePairOf(L left,
V right)
Can be used for static import, i.e.
|
private static final long serialVersionUID
public ValuePair()
ValuePair
with both attributes set to null
.public static <L extends java.lang.Comparable<? super L>,V extends java.lang.Comparable<? super V>> ValuePair<L,V> of(L left, V right)
left
- right
- public static <L extends java.lang.Comparable<? super L>,V extends java.lang.Comparable<? super V>> ValuePair<L,V> valuePairOf(L left, V right)
import static org.sbml.jsbml.util.ValuePair.pairOfin your class to easily create
ValuePair
s of arbitrary data types
with a simple method call, e.g., valuePairOf(1, 2)
.left
- right
- public int compareTo(L l, V v)
ValuePair
.l
- v
- ValuePair
is less than, equal to, or greater than the
combination of the two given values.compareTo(ValuePair)
public V getV()
public boolean isSetL()
public boolean isSetV()
public void setL(L l)
l
- the l to setpublic void setV(V v)
v
- the v to setpublic L getL()