public abstract class DictionaryBase extends Object
Modifier | Constructor and Description |
---|---|
protected |
DictionaryBase(EventHub events,
String filePath,
boolean saveOnChange)
Initializes a new instance of the
DictionaryBase class. |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
export(String filePath)
Exports the dictionary to a file with the specified name.
|
void |
exportDictionary(String filePath)
Exports the dictionary to a file with the specified name.
|
protected String |
getFilePath()
Gets the dictionary file path.
|
protected abstract void |
import_(String filePath)
Imports a dictionary from the specified file.
|
void |
importDictionary(String filePath)
Imports a dictionary from the specified file.
|
protected abstract void |
load()
Loads the dictionary data from disk.
|
protected abstract void |
loadDefault()
Loads the default dictionary data.
|
protected abstract void |
merge(DictionaryBase dictionaryBase)
Merges the specified dictionary into the current dictionary.
|
protected void |
notifyChanged()
Notifies about the dictionary changed.
|
protected abstract void |
save()
Saves the dictionary data to disk.
|
protected final String getFilePath()
Gets the dictionary file path.
protected final void notifyChanged()
Notifies about the dictionary changed.
public final void exportDictionary(String filePath)
Exports the dictionary to a file with the specified name.
filePath
- The file to export to.public final void importDictionary(String filePath)
Imports a dictionary from the specified file.
filePath
- The file to import from.protected abstract void export(String filePath)
Exports the dictionary to a file with the specified name.
filePath
- The file to export to.protected abstract void import_(String filePath)
Imports a dictionary from the specified file.
filePath
- The file to import from.protected abstract void save()
Saves the dictionary data to disk.
protected abstract void load()
Loads the dictionary data from disk.
protected abstract void loadDefault()
Loads the default dictionary data.
protected abstract void merge(DictionaryBase dictionaryBase)
Merges the specified dictionary into the current dictionary.
dictionaryBase
- The dictionary to merge into.