Class Alphabet

    • Constructor Detail

      • Alphabet

        protected Alphabet(String filePath,
                           boolean saveOnChange)

        Initializes a new instance of the Alphabet class.

        filePath - The file name.
        saveOnChange - The save on change flag.
    • Method Detail

      • getCharacterType

        public abstract CharacterType getCharacterType(char character)

        Gets a type of a character.

        character - The character to get a type.
        A type of the character.
      • getCount

        public abstract int getCount()

        Gets the number of characters contained in the Alphabet.

        The number of characters in the dictionary.
      • setRange

        public abstract void setRange(char[] characters,
                                      CharacterType 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.
      • 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.

        Specified by:
        iterator in interface Iterable<Character>
        An iterator that can be used to iterate through the collection.