|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.github.fge.uritemplate.vars.values.VariableValue com.github.fge.uritemplate.vars.values.ListValue
@Immutable public final class ListValue
List variable value
Note that several methods (in this class or the enclosed ListValue.Builder
class) can take any object as an argument. It is the caller's responsibility
to ensure that these objects have a suitable Object.toString()
.toString()} implementation.
While a public constructor exists, it is deprecated. Use one of
the factory methods instead, or a ListValue.Builder
(see newBuilder()
).
Nested Class Summary | |
---|---|
static class |
ListValue.Builder
Builder class for a ListValue |
Field Summary |
---|
Fields inherited from class com.github.fge.uritemplate.vars.values.VariableValue |
---|
BUNDLE |
Method Summary | ||
---|---|---|
static
|
copyOf(Iterable<T> iterable)
Build a list value out of an existing iterable (list, set, other) |
|
List<String> |
getListValue()
Get a list for this value |
|
boolean |
isEmpty()
Tell whether this value is empty |
|
static ListValue.Builder |
newBuilder()
Create a new list value builder |
|
static VariableValue |
of(Object first,
Object... other)
Build a list value out of a series of elements |
Methods inherited from class com.github.fge.uritemplate.vars.values.VariableValue |
---|
getMapValue, getScalarValue, getType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ListValue.Builder newBuilder()
public static <T> VariableValue copyOf(Iterable<T> iterable)
This calls ListValue.Builder.addAll(Iterable)
internally.
T
- the type of iterable elementsiterable
- the iterable
public static VariableValue of(Object first, Object... other)
This calls ListValue.Builder.add(Object, Object...)
internally.
first
- first elementother
- other elements, if any
public List<String> getListValue()
VariableValue
Only valid for list values
getListValue
in class VariableValue
public boolean isEmpty()
VariableValue
For strings, this tells whether the string itself is empty. For lists and maps, this tells whether the list or map have no elements/entries.
isEmpty
in class VariableValue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |