com.groupdocs.search.dictionaries

Class CharacterReplacementDictionary

    • Constructor Detail

      • CharacterReplacementDictionary

        protected CharacterReplacementDictionary(String filePath,
                                                 boolean saveOnChange)

        Initializes a new instance of the CharacterReplacementDictionary class.

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

      • getCount

        public abstract int getCount()

        Gets the number of characters contained in this CharacterReplacementDictionary.

        Returns:
        The number of characters in the dictionary.
      • addRange

        public abstract void addRange(Iterable<CharacterReplacementPair> characterReplacements)

        Adds the specified collection of character replacements to this instance of the CharacterReplacementDictionary.

        Parameters:
        characterReplacements - The collection of character replacements to add to the dictionary.
      • addRange

        public abstract void addRange(CharacterReplacementPair[] characterReplacements)

        Adds the specified collection of character replacements to this instance of the CharacterReplacementDictionary.

        Parameters:
        characterReplacements - The collection of character replacements to add to the dictionary.
      • removeRange

        public abstract void removeRange(char[] characters)

        Removes the specified collection of character replacements from this instance of the CharacterReplacementDictionary.

        Parameters:
        characters - The collection of characters to remove.
      • contains

        public abstract boolean contains(char character)

        Determines whether a CharacterReplacementDictionary object contains a replacement for the specified character.

        Parameters:
        character - The character to locate in the CharacterReplacementDictionary object.
        Returns:
        true if the CharacterReplacementDictionary object contains the specified character; otherwise, false.
      • getReplacement

        public abstract char getReplacement(char character)

        Gets a replacement for the specified character.

        Parameters:
        character - The character to get a replacement for.
        Returns:
        The replacement for the specified character.
      • clear

        public abstract void clear()

        Removes all character replacements from a CharacterReplacementDictionary object.

      • iterator

        public abstract Iterator<Character> iterator()

        Returns an iterator that iterates through the collection.

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