public class IniFileSection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static FwkDescriptionInterface |
descriptor |
protected java.util.Hashtable |
sectionEntryHash |
protected java.util.ArrayList |
sectionEntryList |
protected java.lang.String |
sectionName |
static java.lang.String |
version |
Constructor and Description |
---|
IniFileSection() |
Modifier and Type | Method and Description |
---|---|
static FwkDescriptionInterface |
getDescriptor() |
int |
getMaximumSectionEntryNameLength()
Get the length of the longest section entry name.
|
IniFileSectionEntry |
getSectionEntry(int sectionEntryPosition)
Get a section entry by position.
|
IniFileSectionEntry |
getSectionEntry(java.lang.String name)
Get a section entry by name.
|
int |
getSectionEntryCount()
Get the number of section entries.
|
int |
getSectionEntryPosition(IniFileSectionEntry sectionEntry)
Get the position of a section entry.
|
int |
getSectionEntryPosition(java.lang.String name)
Get the position of a section entry.
|
java.lang.String |
getSectionName()
Get the section name.
|
java.lang.String |
getVersion() |
void |
removeSectionEntry(IniFileSectionEntry sectionEntry)
Remove a section entry.
|
void |
removeSectionEntry(int sectionEntryPosition)
Remove a section entry by position.
!!!!!!!
|
void |
removeSectionEntry(java.lang.String name)
Remove a section entry by name.
|
void |
renameSectionEntry(java.lang.String oldName,
java.lang.String newName)
Rename a section entry.
|
IniFileSectionEntry |
setSectionComment(java.lang.String comment)
Set or create a section comment.
|
void |
setSectionEntry(IniFileSectionEntry sectionEntry)
Set or create a section entry.
|
IniFileSectionEntry |
setSectionEntry(java.lang.String name,
java.lang.String value)
Set or create a section entry.
|
void |
setSectionName(java.lang.String sectionName)
Set the section name.
|
void |
sortSectionEntries(boolean ascending)
Sort the section entries.
!!!!!!!
|
public static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
protected java.util.ArrayList sectionEntryList
protected java.util.Hashtable sectionEntryHash
protected java.lang.String sectionName
public java.lang.String getVersion()
public static FwkDescriptionInterface getDescriptor()
public int getMaximumSectionEntryNameLength()
public IniFileSectionEntry getSectionEntry(java.lang.String name)
name
- The name of the requested entry.public IniFileSectionEntry getSectionEntry(int sectionEntryPosition)
sectionEntryPosition
- The position of the requested entry.public int getSectionEntryCount()
public int getSectionEntryPosition(java.lang.String name)
name
- The name of the section entry.public int getSectionEntryPosition(IniFileSectionEntry sectionEntry)
sectionEntry
- The section entry.public java.lang.String getSectionName()
public void removeSectionEntry(java.lang.String name)
name
- The name of the section entry to be removed.public void removeSectionEntry(int sectionEntryPosition)
position
- The position of the section entry to be removed.public void removeSectionEntry(IniFileSectionEntry sectionEntry)
sectionEntry
- The section entry to be removed.public void renameSectionEntry(java.lang.String oldName, java.lang.String newName)
oldName
- The current name of the section entry.newName
- The new name of the section entry.public IniFileSectionEntry setSectionComment(java.lang.String comment)
comment
- The comment of the entry.public IniFileSectionEntry setSectionEntry(java.lang.String name, java.lang.String value)
name
- The name of the entry.value
- The value of the entry.public void setSectionEntry(IniFileSectionEntry sectionEntry)
sectionEntry
- The section entry.public void setSectionName(java.lang.String sectionName)
sectionName
- The section name.public void sortSectionEntries(boolean ascending)
ascending
- Sort in ascending order if true.