Class SynonymDictionary

    • Method Detail

      • getCount

        public final int getCount()

        Gets the number of words contained in the SynonymDictionary.

      • addRange

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

        Adds the specified collection of synonyms to this instance of the SynonymDictionary.

        synonyms - The collection of synonyms to add to the dictionary.
        Throws: - Thrown when synonyms is null. - Thrown when number of synonyms in a group is less than 2.
      • clear

        public final void clear()

        Removes all words from a SynonymDictionary object.

      • exportDictionary

        public final void exportDictionary(String fileName)

        Exports the synonym dictionary to a file with the specified name.

        fileName - The name of the text file to export to.
      • importDictionary

        public final void importDictionary(String fileName)

        Imports a synonym dictionary from the specified text file.

        fileName - The file to import from.
      • iterator

        public final<String> iterator()

        Returns an enumerator that iterates through the collection.

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

        public final iterator_Rename_Namesake()

        Returns an enumerator that iterates through a collection.

        An IEnumerator object that can be used to iterate through the collection.