protected static class KVList.ValueImpl extends java.lang.Object implements KVList.Value
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
list
list for multiple entries, may be
null |
private java.lang.String |
value
string value for a single entry, may be
null |
Constructor and Description |
---|
ValueImpl()
constructor
|
ValueImpl(java.lang.String v)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String v)
add the given string as a value
|
void |
add(java.lang.String[] values)
add all strings to the value
|
void |
clear()
clear the content
|
int |
getCount()
return the number of strings stored in the value
|
java.lang.String |
getFirst()
return the first value
|
java.util.Iterator<java.lang.String> |
iterator()
return an iterator for the value that iterates thru the strings
|
void |
set(java.lang.String v)
replace the contents of the value with the given one
|
void |
set(java.lang.String[] values)
replace the contents of the value with the given strings
|
java.lang.String[] |
toArray(java.lang.String[] values)
copy the contents into the given array.
|
java.util.List<java.lang.String> |
toList()
return the content as a list
|
private java.lang.String value
null
private java.util.List<java.lang.String> list
null
public ValueImpl()
public ValueImpl(java.lang.String v)
v
- the value to initialize withpublic void add(java.lang.String v)
v
- the valuepublic void add(java.lang.String[] values)
values
- the valuespublic void clear()
public void set(java.lang.String v)
v
- the valuepublic void set(java.lang.String[] values)
values
- the valuespublic int getCount()
getCount
in interface KVList.Value
public java.lang.String getFirst()
getFirst
in interface KVList.Value
null
if
the value does not contain any stringpublic java.lang.String[] toArray(java.lang.String[] values)
null
or too small, a new array is allocatedtoArray
in interface KVList.Value
values
- the array, may be null
public java.util.List<java.lang.String> toList()
toList
in interface KVList.Value
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
Copyright © 2005-2013 Knipp Medien und Kommunikation GmbH