|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.knipp.rritoolkit.KVList.ValueImpl
protected static class KVList.ValueImpl
inner class that implements a value
Field Summary | |
---|---|
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 Summary | |
---|---|
KVList.ValueImpl()
constructor |
|
KVList.ValueImpl(java.lang.String v)
constructor |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String value
null
private java.util.List<java.lang.String> list
null
Constructor Detail |
---|
public KVList.ValueImpl()
public KVList.ValueImpl(java.lang.String v)
v
- the value to initialize withMethod Detail |
---|
public 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 allocated
toArray
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>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |