public abstract class AliasDictionary extends DictionaryBase implements Iterable<String>
Learn more
ErrorOccurred
Modifier | Constructor and Description |
---|---|
protected |
AliasDictionary(String filePath,
boolean saveOnChange)
Initializes a new instance of the
AliasDictionary class. |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(String alias,
String text)
Adds the specified pair of alias and associated text to this instance of the
AliasDictionary . |
abstract void |
addRange(AliasReplacementPair[] pairs)
Adds the specified collection of alias/replacement pairs to this instance of the
AliasDictionary . |
abstract void |
addRange(Iterable<AliasReplacementPair> pairs)
Adds the specified collection of alias/replacement pairs to this instance of the
AliasDictionary . |
abstract void |
clear()
Removes all aliases from a
AliasDictionary object. |
abstract boolean |
contains(String alias)
Determines whether an
AliasDictionary object contains the specified alias. |
abstract int |
getCount()
Gets the number of aliases contained in the
AliasDictionary . |
abstract String |
getText(String alias)
Gets a text that is associated with the specified alias.
|
abstract Iterator<String> |
iterator()
Returns an iterator that iterates through the collection.
|
abstract boolean |
remove(String alias)
Removes the specified alias from an
AliasDictionary object. |
copyFrom, export, exportDictionary, getFilePath, getFilePathStatic, getStandardFileName, getStandardFileNameStatic, import_, importDictionary, load, loadDefault, loadInternalStatic, merge, mergeInternalStatic, notifyChanged, save, setFilePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected AliasDictionary(String filePath, boolean saveOnChange)
Initializes a new instance of the AliasDictionary
class.
filePath
- The file name.saveOnChange
- The save on change flag.public abstract int getCount()
Gets the number of aliases contained in the AliasDictionary
.
AliasDictionary
.public abstract void addRange(Iterable<AliasReplacementPair> pairs)
Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary
.
pairs
- The collection of alias/replacement pairs to add to the dictionary.public abstract void addRange(AliasReplacementPair[] pairs)
Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary
.
pairs
- The collection of alias/replacement pairs to add to the dictionary.public abstract void add(String alias, String text)
Adds the specified pair of alias and associated text to this instance of the AliasDictionary
.
alias
- The alias to add to the dictionary.text
- The text to be associated with the alias.public abstract boolean remove(String alias)
Removes the specified alias from an AliasDictionary
object.
alias
- The alias to remove.true
if the alias is successfully found and removed.
This method returns false
if the alias is not found in the AliasDictionary
object.public abstract boolean contains(String alias)
Determines whether an AliasDictionary
object contains the specified alias.
alias
- The alias to locate in the AliasDictionary
object.true
if the AliasDictionary
object contains the specified alias; otherwise, false
.public abstract String getText(String alias)
Gets a text that is associated with the specified alias.
alias
- The alias to locate in the AliasDictionary
object.null
.public abstract void clear()
Removes all aliases from a AliasDictionary
object.