com.groupdocs.search.dictionaries

Class AliasDictionary

    • Constructor Detail

      • AliasDictionary

        protected AliasDictionary(String filePath,
                                  boolean saveOnChange)

        Initializes a new instance of the AliasDictionary class.

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

      • getCount

        public abstract int getCount()

        Gets the number of aliases contained in the AliasDictionary.

        Returns:
        The number of aliases contained in the AliasDictionary.
      • addRange

        public abstract void addRange(Iterable<AliasReplacementPair> pairs)

        Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary.

        Parameters:
        pairs - The collection of alias/replacement pairs to add to the dictionary.
      • addRange

        public abstract void addRange(AliasReplacementPair[] pairs)

        Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary.

        Parameters:
        pairs - The collection of alias/replacement pairs to add to the dictionary.
      • add

        public abstract void add(String alias,
                                 String text)

        Adds the specified pair of alias and associated text to this instance of the AliasDictionary.

        Parameters:
        alias - The alias to add to the dictionary.
        text - The text to be associated with the alias.
      • remove

        public abstract boolean remove(String alias)

        Removes the specified alias from an AliasDictionary object.

        Parameters:
        alias - The alias to remove.
        Returns:
        This method returns true if the alias is successfully found and removed. This method returns false if the alias is not found in the AliasDictionary object.
      • contains

        public abstract boolean contains(String alias)

        Determines whether an AliasDictionary object contains the specified alias.

        Parameters:
        alias - The alias to locate in the AliasDictionary object.
        Returns:
        true if the AliasDictionary object contains the specified alias; otherwise, false.
      • getText

        public abstract String getText(String alias)

        Gets a text that is associated with the specified alias.

        Parameters:
        alias - The alias to locate in the AliasDictionary object.
        Returns:
        A text associated with the specified alias or null.
      • clear

        public abstract void clear()

        Removes all aliases from a AliasDictionary 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.