|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objectorg.javatuples.Tuple
org.javatuples.LabelValue<A,B>
public final class LabelValue<A,B>
A tuple of two elements, with positions 0 and 1 renamed as "label" and "value", respectively.
| Constructor Summary | |
|---|---|
LabelValue(A label,
B value)
|
|
| Method Summary | ||
|---|---|---|
static
|
fromArray(X[] array)
Create tuple from array. |
|
static
|
fromCollection(Collection<X> collection)
|
|
static
|
fromIterable(Iterable<X> iterable)
|
|
static
|
fromIterable(Iterable<X> iterable,
int index)
|
|
A |
getLabel()
|
|
int |
getSize()
Return the size of the tuple. |
|
B |
getValue()
|
|
|
setLabel(X label)
|
|
|
setValue(Y value)
|
|
static
|
with(A label,
B value)
|
|
| Methods inherited from class org.javatuples.Tuple |
|---|
compareTo, contains, containsAll, containsAll, equals, getValue, hashCode, indexOf, iterator, lastIndexOf, toArray, toList, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabelValue(A label,
B value)
| Method Detail |
|---|
public static <A,B> LabelValue<A,B> with(A label,
B value)
public static <X> LabelValue<X,X> fromArray(X[] array)
Create tuple from array. Array has to have exactly two elements.
X - the array component typearray - the array to be converted to a tuple
public static <X> LabelValue<X,X> fromCollection(Collection<X> collection)
public static <X> LabelValue<X,X> fromIterable(Iterable<X> iterable)
public static <X> LabelValue<X,X> fromIterable(Iterable<X> iterable,
int index)
public A getLabel()
getLabel in interface IValueLabel<A>public B getValue()
getValue in interface IValueValue<B>public int getSize()
TupleReturn the size of the tuple.
getSize in class Tuplepublic <X> LabelValue<X,B> setLabel(X label)
public <Y> LabelValue<A,Y> setValue(Y value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||