public abstract class AbstractConfigurationFile extends Object implements AbstractEntryContainer
| Constructor and Description |
|---|
AbstractConfigurationFile()
Constructor for AbstractConfigurationFile
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(AbstractEntry entry)
Adds an entry
|
void |
addEntry(int index,
AbstractEntry entry)
Adds an entry at an index
|
boolean |
equals(Object obj)
Tests whether this Object is equal to another one
|
ConfigurationFileListIterator |
getConfigurationFileListIterator() |
List<AbstractEntry> |
getEntries()
Gets the entries
|
AbstractEntry |
getEntry(int index)
Gets an entry at a given index
|
int |
hashCode()
Gets the hash code for this Object
|
int |
indexOfEntry(AbstractEntry entry)
Gets the index of an AbstractEntry
|
Iterator<AbstractEntry> |
iterator()
Gets an Iterator for the AbstractEntries
|
abstract void |
parse(File file)
Parses a File
|
void |
removeEntry(AbstractEntry entry)
Removes an entry
|
void |
save(File file)
Writes the current configuration to a File
|
String |
toString()
Gets a String representation of this Object
|
allowsEntryTypepublic AbstractConfigurationFile()
public abstract void parse(File file) throws FileNotFoundException, IOException, ParseException
file - File to parseFileNotFoundException - if the File is not foundIOException - for all other I/O errorsParseException - for any parsing errorspublic void save(File file) throws FileNotFoundException, IOException
file - File to write toFileNotFoundException - if the File is not foundIOException - for all other I/O errorspublic Iterator<AbstractEntry> iterator()
iterator in interface AbstractEntryContaineriterator in interface Iterable<AbstractEntry>public List<AbstractEntry> getEntries()
getEntries in interface AbstractEntryContainerpublic void addEntry(AbstractEntry entry)
addEntry in interface AbstractEntryContainerentry - entry to addpublic void addEntry(int index,
AbstractEntry entry)
addEntry in interface AbstractEntryContainerindex - indexentry - entry to addpublic AbstractEntry getEntry(int index)
getEntry in interface AbstractEntryContainerindex - index to examinepublic int indexOfEntry(AbstractEntry entry)
indexOfEntry in interface AbstractEntryContainerentry - entry to look forpublic void removeEntry(AbstractEntry entry)
removeEntry in interface AbstractEntryContainerentry - entry to removepublic boolean equals(Object obj)
public int hashCode()
public String toString()
public ConfigurationFileListIterator getConfigurationFileListIterator()
? Copyright 2013 BMC Software, Inc.