|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.knipp.rritoolkit.KVMultiList
public class KVMultiList
class that represents a key-value list consisting of multiple sections.
each section itself is represented by a KVList
. Please note
that the comparison of section names is performed case-sensitive.
Therefore, all keys are expected to be lower-case normalized.
Nested Class Summary | |
---|---|
private static class |
KVMultiList.Section
small class that represents a section. |
Field Summary | |
---|---|
private java.util.Map<KVList,KVMultiList.Section> |
listMap
the map from the list to the section |
private KVList |
mainList
the main key-value list |
private java.util.Map<java.lang.String,java.util.List<KVMultiList.Section>> |
nameMap
mapping from the section names to the sections |
private java.util.Set<KVMultiList.Section> |
sections
the set of all sections |
Constructor Summary | |
---|---|
KVMultiList()
constructor |
Method Summary | |
---|---|
void |
addSection(KVList list,
java.lang.String... names)
add the given list as a new section |
KVList |
getFirstSection(java.lang.String name)
return the first section with the given name |
KVList |
getMainSection()
return the main section |
java.lang.String[] |
getSectionNames(KVList list)
return the subsection names of the given list. |
java.util.List<KVList> |
getSections(java.lang.String name)
return the subsections with the given name |
java.util.Iterator<KVList> |
getSubsections()
return an iterator over all subsections |
KVList |
newSection(java.lang.String... names)
create a new section with the given name(s) |
void |
removeSection(KVList list)
remove the section represented by the given list |
private void |
removeSection(KVMultiList.Section s)
remove the given section |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private KVList mainList
private java.util.Set<KVMultiList.Section> sections
private java.util.Map<java.lang.String,java.util.List<KVMultiList.Section>> nameMap
private java.util.Map<KVList,KVMultiList.Section> listMap
Constructor Detail |
---|
public KVMultiList()
Method Detail |
---|
public KVList getMainSection()
public java.util.List<KVList> getSections(java.lang.String name)
name
- the name
public KVList getFirstSection(java.lang.String name)
name
- the name
null
if
no section with the given name existsprivate void removeSection(KVMultiList.Section s)
s
- the section to removepublic void removeSection(KVList list)
list
- the list to removepublic KVList newSection(java.lang.String... names)
names
- the names
public void addSection(KVList list, java.lang.String... names)
list
- the list to addnames
- the names for the sectionpublic java.lang.String[] getSectionNames(KVList list)
list
- the list of which the names shall be
return
null
if the list
not a subsectionpublic java.util.Iterator<KVList> getSubsections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |