public abstract class CharacterReplacementDictionary extends DictionaryBase implements Iterable<Character>
Represents a character replacement dictionary that is used during the indexing process. Character replacement can be used, for example, to remove accents from accented characters or to make case-insensitive index.
Learn more
Modifier | Constructor and Description |
---|---|
protected |
CharacterReplacementDictionary(EventHub events,
String filePath,
boolean saveOnChange)
Initializes a new instance of the
CharacterReplacementDictionary class. |
Modifier and Type | Method and Description |
---|---|
abstract void |
addRange(CharacterReplacementPair[] characterReplacements)
Adds the specified collection of character replacements to this instance of the
CharacterReplacementDictionary . |
abstract void |
addRange(Iterable<CharacterReplacementPair> characterReplacements)
Adds the specified collection of character replacements to this instance of the
CharacterReplacementDictionary . |
abstract void |
clear()
Removes all character replacements from a
CharacterReplacementDictionary object. |
abstract boolean |
contains(char character)
Determines whether a
CharacterReplacementDictionary object contains a replacement for the specified character. |
abstract int |
getCount()
Gets the number of characters contained in this
CharacterReplacementDictionary . |
abstract char |
getReplacement(char character)
Gets a replacement for the specified character.
|
abstract Iterator<Character> |
iterator()
Returns an iterator that iterates through the collection.
|
abstract void |
removeRange(char[] characters)
Removes the specified collection of character replacements from this instance of the
CharacterReplacementDictionary . |
export, exportDictionary, getFilePath, import_, importDictionary, load, loadDefault, merge, notifyChanged, save
public abstract int getCount()
Gets the number of characters contained in this CharacterReplacementDictionary
.
public abstract void addRange(Iterable<CharacterReplacementPair> characterReplacements)
Adds the specified collection of character replacements to this instance of the CharacterReplacementDictionary
.
characterReplacements
- The collection of character replacements to add to the dictionary.public abstract void addRange(CharacterReplacementPair[] characterReplacements)
Adds the specified collection of character replacements to this instance of the CharacterReplacementDictionary
.
characterReplacements
- The collection of character replacements to add to the dictionary.public abstract void removeRange(char[] characters)
Removes the specified collection of character replacements from this instance of the CharacterReplacementDictionary
.
characters
- The collection of characters to remove.public abstract boolean contains(char character)
Determines whether a CharacterReplacementDictionary
object contains a replacement for the specified character.
character
- The character to locate in the CharacterReplacementDictionary
object.true
if the CharacterReplacementDictionary
object contains the specified character;
otherwise, false
.public abstract char getReplacement(char character)
Gets a replacement for the specified character.
character
- The character to get a replacement for.public abstract void clear()
Removes all character replacements from a CharacterReplacementDictionary
object.