public abstract class Alphabet extends DictionaryBase implements Iterable<Character>
Represents a dictionary of characters that is used during indexing to detect character type. Each character can be handled as separator, as letter, or both.
Learn more
Modifier | Constructor and Description |
---|---|
protected |
Alphabet(EventHub events,
String filePath,
boolean saveOnChange)
Initializes a new instance of the
Alphabet class. |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Sets the
CharacterType.Separator type for all characters in this Alphabet . |
abstract int |
getCharacterType(char character)
Gets a type of a character.
|
abstract int |
getCount()
Gets the number of characters contained in the
Alphabet . |
abstract Iterator<Character> |
iterator()
Returns an iterator that iterates through the collection.
|
abstract void |
setRange(char[] characters,
int type)
Sets the type for each character of the specified collection in this instance of the
Alphabet . |
export, exportDictionary, getFilePath, import_, importDictionary, load, loadDefault, merge, notifyChanged, save
public abstract int getCharacterType(char character)
Gets a type of a character.
character
- The character to get a type.public abstract int getCount()
Gets the number of characters contained in the Alphabet
.
public abstract void setRange(char[] characters, int type)
Sets the type for each character of the specified collection in this instance of the Alphabet
.
characters
- The collection of characters to set the type.type
- The character type.public abstract void clear()
Sets the CharacterType.Separator
type for all characters in this Alphabet
.