Package net.sf.basedb.util.bfs
Class MetadataModel.Section
java.lang.Object
net.sf.basedb.util.bfs.MetadataModel.Section
- Enclosing class:
- MetadataModel
Holds information about a section.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a new entry to this section.void
Add a new entry to this section.getEntry
(int index) Get the entry in this section with the given index.Get the first entry in this section with a given key.int
Get the number of entries in this section.int
Get the index of the first entry with the given key.getKey
(int index) Get the key of the entry at the given index.getName()
Get the name of the section.getValue
(int index) Get the value of the entry at the given index.Get the value of the first entry with a given key.String[]
getValues
(int index) Get the values of the entry at the given index.String[]
Get the values of the first entry with a given key.
-
Field Details
-
name
-
entries
-
-
Constructor Details
-
Section
Create a new section.- Parameters:
name
- The name of the section
-
-
Method Details
-
getName
Get the name of the section. -
getEntryCount
public int getEntryCount()Get the number of entries in this section. -
addEntry
Add a new entry to this section. -
addEntry
Add a new entry to this section.- Parameters:
key
- The key of the entryvalues
- The values
-
getEntry
Get the entry in this section with the given index.- Parameters:
index
- The index of the entry, a value between 0 andgetEntryCount()
- 1- Returns:
- A section entry
-
getEntry
Get the first entry in this section with a given key.- Parameters:
key
- The key to look for- Returns:
- A section entry, or null if no entry with the given key exists
-
getKey
Get the key of the entry at the given index.- Parameters:
index
- The index of the entry, a value between 0 andgetEntryCount()
- 1- Returns:
- The key of the entry
-
getIndex
Get the index of the first entry with the given key.- Parameters:
key
- The key to look for- Returns:
- The index of the entry, or -1 if the key is not found
-
getValue
Get the value of the entry at the given index.- Parameters:
index
- The index of the entry, a value between 0 andgetEntryCount()
- 1- Returns:
- The value of the entry
-
getValues
Get the values of the entry at the given index.- Parameters:
index
- The index of the entry, a value between 0 andgetEntryCount()
- 1- Returns:
- The value of the entry
-
getValue
Get the value of the first entry with a given key.- Parameters:
key
- The key of the entry- Returns:
- The value, or null if no entry for the given key exists
-
getValues
Get the values of the first entry with a given key.- Parameters:
key
- The key of the entry- Returns:
- The value, or null if no entry for the given key exists
-