Alphabet
All Implemented Interfaces: com.groupdocs.search.dictionaries.DictionaryBase, java.lang.Iterable
public interface Alphabet extends DictionaryBase, Iterable<Character>
Defines interface of 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
Methods
Method | Description |
---|---|
getCharacterType(char character) | Gets a type of a character. |
getCount() | Gets the number of characters contained in the Alphabet . |
setRange(char[] characters, CharacterType type) | Sets the type for each character of the specified collection in this instance of the Alphabet . |
clear() | Sets the CharacterType.Separator type for all characters in this Alphabet . |
iterator() | Returns an iterator that iterates through the collection. |
getCharacterType(char character)
public abstract CharacterType getCharacterType(char character)
Gets a type of a character.
Parameters:
Parameter | Type | Description |
---|---|---|
character | char | The character to get a type. |
Returns: CharacterType - A type of the character.
getCount()
public abstract int getCount()
Gets the number of characters contained in the Alphabet .
Returns: int - The number of characters in the dictionary.
setRange(char[] characters, CharacterType type)
public abstract void setRange(char[] characters, CharacterType type)
Sets the type for each character of the specified collection in this instance of the Alphabet .
Parameters:
Parameter | Type | Description |
---|---|---|
characters | char[] | The collection of characters to set the type. |
type | CharacterType | The character type. |
clear()
public abstract void clear()
Sets the CharacterType.Separator type for all characters in this Alphabet .
iterator()
public abstract Iterator<Character> iterator()
Returns an iterator that iterates through the collection.
Returns: java.util.Iterator<java.lang.Character> - An iterator that can be used to iterate through the collection.