com.groupdocs.search.dictionaries

Class SynonymDictionary

    • Constructor Detail

      • SynonymDictionary

        protected SynonymDictionary(EventHub events,
                         String filePath,
                         boolean saveOnChange)

        Initializes a new instance of the SynonymDictionary class.

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

      • getCount

        public abstract int getCount()

        Gets the number of words contained in this SynonymDictionary.

        Returns:
        The number of words contained in this SynonymDictionary.
      • addRange

        public abstract void addRange(Iterable<String[]> synonyms)

        Adds the specified collection of synonym groups to this instance of the SynonymDictionary.

        Parameters:
        synonyms - The collection of synonym groups to add to the dictionary.
      • addRange

        public abstract void addRange(String[][] synonyms)

        Adds the specified collection of synonym groups to this instance of the SynonymDictionary.

        Parameters:
        synonyms - The collection of synonym groups to add to the dictionary.
      • clear

        public abstract void clear()

        Removes all words from this SynonymDictionary object.

      • iterator

        public abstract Iterator<String> iterator()

        Returns an iterator that iterates through the collection.

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