com.groupdocs.search

Class AliasDictionary

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void add(String alias, String text)
      Adds the specified pair of alias and associated text to this instance of the AliasDictionary.
      void addRange(Iterable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,String>> pairs)
      Adds the specified collection of key/value pairs to this instance of the AliasDictionary.
      void clear()
      Removes all aliases from a AliasDictionary object.
      boolean contains(String alias)
      Determines whether a AliasDictionary object contains the specified alias.
      void export(String fileName)
      Deprecated. 
      void exportDictionary(String fileName)
      Exports the alias dictionary to the specified text file.
      int getCount()
      Gets the number of aliases contained in the AliasDictionary.
      String getText(String alias)
      Gets a text that is associated with the specified alias.
      void import_(String fileName)
      Deprecated. 
      void importDictionary(String fileName)
      Imports an alias dictionary from the specified text file.
      com.aspose.ms.System.Collections.IEnumerator iterator_Rename_Namesake()
      Returns an enumerator that iterates through a collection.
      com.aspose.ms.System.Collections.Generic.IGenericEnumerator<String> iterator()
      Returns an enumerator that iterates through the collection.
      boolean remove(String alias)
      Removes the specified alias from an AliasDictionary object.
    • Method Detail

      • getCount

        public final int getCount()

        Gets the number of aliases contained in the AliasDictionary.

      • addRange

        public final void addRange(Iterable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,String>> pairs)

        Adds the specified collection of key/value pairs to this instance of the AliasDictionary.

        Parameters:
        pairs - The collection of key/value pairs to add to the dictionary.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when pairs is null.
      • add

        public final 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.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when alias or text is null.
        com.aspose.ms.System.ArgumentException - Alias contains character that is not from the ranges a-b and 0-9.
      • remove

        public final 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.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when alias is null.
      • contains

        public final boolean contains(String alias)

        Determines whether a 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.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when alias is null.
      • getText

        public final 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.
        Throws:
        com.aspose.ms.System.ArgumentNullException - Thrown when alias is null.
      • clear

        public final void clear()

        Removes all aliases from a AliasDictionary object.

      • export

        @Deprecated
        public final void export(String fileName)
        Deprecated. 

        Exports the alias dictionary to the specified text file.

        Parameters:
        fileName - The file to export to.
      • exportDictionary

        public final void exportDictionary(String fileName)

        Exports the alias dictionary to the specified text file.

        Parameters:
        fileName - The file to export to.
      • import_

        @Deprecated
        public final void import_(String fileName)
        Deprecated. 

        Imports an alias dictionary from the specified text file.

        Parameters:
        fileName - The file to import from.
      • importDictionary

        public final void importDictionary(String fileName)

        Imports an alias dictionary from the specified text file.

        Parameters:
        fileName - The file to import from.
      • iterator

        public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<String> iterator()

        Returns an enumerator that iterates through the collection.

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

        public final com.aspose.ms.System.Collections.IEnumerator iterator_Rename_Namesake()

        Returns an enumerator that iterates through a collection.

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