|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dtools.ini.IniFile
org.dtools.ini.AdvancedIniFile
public class AdvancedIniFile
This implementation of the IniFile interface offers faster
performance compared with the BasicIniFile implementation, but
at the expense of greater memory usage.
| Field Summary |
|---|
| Fields inherited from class org.dtools.ini.IniFile |
|---|
validator |
| Constructor Summary | |
|---|---|
AdvancedIniFile()
Default constructor which creates a new instance of BasicIniFile and sets the IniFile to have a
default IniValidator and to be case insensitive. |
|
AdvancedIniFile(boolean caseSensitive)
Default constructor which creates a new instance of BasicIniFile and sets the IniFile to have a
default IniValidator. |
|
AdvancedIniFile(IniValidator validator)
Default constructor which creates a new instance of BasicIniFile and sets the IniFile to have a
default IniValidator and to be case insensitive. |
|
AdvancedIniFile(IniValidator validator,
boolean caseSensitive)
Default constructor which creates a new instance of BasicIniFile and sets the IniFile to have a
default IniValidator and to be case insensitive. |
|
| Method Summary | |
|---|---|
boolean |
addSection(IniSection section,
int index)
Adds a section to this INI file. |
Object |
clone()
|
protected IniSection |
createSection(String name)
This method creates and returns a new instance of an IniSection with the same IniValidator and case
sensitivity as this object. |
IniSection |
getSection(int index)
Get the section which is at the given index. |
Collection<IniSection> |
getSections()
Gets a collection of all the sections within this INI file. |
int |
indexOf(IniSection section)
Get the index of the given section, where 0 is the index is the first section. |
Iterator<IniSection> |
iterator()
|
boolean |
removeSection(IniSection section)
Removes the given section only if the section is within this IniFile |
| Methods inherited from class org.dtools.ini.IniFile |
|---|
addOrMergeSection, addSection, addSection, addSection, addSections, equals, getNumberOfItems, getNumberOfSections, getSection, getSectionNames, getValidator, hashCode, hasSection, hasSection, indexOf, isCaseSensitive, isEmpty, merge, moveSection, moveSection, removeAll, removeSection, removeSection, removeSections, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AdvancedIniFile()
Default constructor which creates a new instance of
BasicIniFile and sets the IniFile to have a
default IniValidator and to be case insensitive.
public AdvancedIniFile(boolean caseSensitive)
Default constructor which creates a new instance of
BasicIniFile and sets the IniFile to have a
default IniValidator.
caseSensitive - Sets whether this instance of IniFile
is case sensitive or not.public AdvancedIniFile(IniValidator validator)
Default constructor which creates a new instance of
BasicIniFile and sets the IniFile to have a
default IniValidator and to be case insensitive.
validator - Sets the IniValidator if this instance of
IniFile.
public AdvancedIniFile(IniValidator validator,
boolean caseSensitive)
Default constructor which creates a new instance of
BasicIniFile and sets the IniFile to have a
default IniValidator and to be case insensitive.
caseSensitive - Sets whether this instance of IniFile
is case sensitive or not.validator - Sets the IniValidator if this instance of
IniFile.| Method Detail |
|---|
public boolean addSection(IniSection section,
int index)
IniFileAdds a section to this INI file. If an existing section has the same name as the given section, then the new section is not added and the method returns false. If the given section is of a type that is not compatible with the class that implements this interface, then a compatible copy of the section is made which is then added to the class.
addSection in class IniFilesection - The section to add to this INI file.index - The index where to add the section, where 0 is the index of
the first section. Any section that already exists at this index
will be moved to index + 1. If the value is greater
than the number of sections within this INI file, then the section
is appended to the end of the INI file.
protected IniSection createSection(String name)
IniFileIniSection with the same IniValidator and case
sensitivity as this object.
createSection in class IniFilename - The name of the IniSection to create.
IniSection with the same
IniValidator and case sensitivity as this object.public IniSection getSection(int index)
IniFile
getSection in class IniFileindex - the index of the section to retrieve.
public Collection<IniSection> getSections()
IniFile
getSections in class IniFilepublic int indexOf(IniSection section)
IniFile
indexOf in class IniFilesection - The section whose index will be retured
public boolean removeSection(IniSection section)
IniFile
removeSection in class IniFilesection - The section to remove.
public Object clone()
clone in class IniFilepublic Iterator<IniSection> iterator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||