public static class MetadataModel.Section
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<MetadataModel.SectionEntry> |
entries |
private java.lang.String |
name |
Constructor and Description |
---|
Section(java.lang.String name)
Create a new section.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(MetadataModel.SectionEntry entry)
Add a new entry to this section.
|
MetadataModel.SectionEntry |
addEntry(java.lang.String key,
java.lang.String... values)
Add a new entry to this section.
|
MetadataModel.SectionEntry |
getEntry(int index)
Get the entry in this section with the given index.
|
MetadataModel.SectionEntry |
getEntry(java.lang.String key)
Get the first entry in this section with a given key.
|
int |
getEntryCount()
Get the number of entries in this section.
|
int |
getIndex(java.lang.String key)
Get the index of the first entry with the given key.
|
java.lang.String |
getKey(int index)
Get the key of the entry at the given index.
|
java.lang.String |
getName()
Get the name of the section.
|
java.lang.String |
getValue(int index)
Get the value of the entry at the given index.
|
java.lang.String |
getValue(java.lang.String key)
Get the value of the first entry with a given key.
|
java.lang.String[] |
getValues(int index)
Get the values of the entry at the given index.
|
java.lang.String[] |
getValues(java.lang.String key)
Get the values of the first entry with a given key.
|
private java.lang.String name
private java.util.List<MetadataModel.SectionEntry> entries
public Section(java.lang.String name)
name
- The name of the sectionpublic java.lang.String getName()
public int getEntryCount()
public void addEntry(MetadataModel.SectionEntry entry)
public MetadataModel.SectionEntry addEntry(java.lang.String key, java.lang.String... values)
key
- The key of the entryvalues
- The valuespublic MetadataModel.SectionEntry getEntry(int index)
index
- The index of the entry, a value between 0 and
getEntryCount()
- 1public MetadataModel.SectionEntry getEntry(java.lang.String key)
key
- The key to look forpublic java.lang.String getKey(int index)
index
- The index of the entry, a value between 0 and
getEntryCount()
- 1public int getIndex(java.lang.String key)
key
- The key to look forpublic java.lang.String getValue(int index)
index
- The index of the entry, a value between 0 and
getEntryCount()
- 1public java.lang.String[] getValues(int index)
index
- The index of the entry, a value between 0 and
getEntryCount()
- 1public java.lang.String getValue(java.lang.String key)
key
- The key of the entrypublic java.lang.String[] getValues(java.lang.String key)
key
- The key of the entry