AliasDictionary
All Implemented Interfaces: com.groupdocs.search.dictionaries.DictionaryBase, java.lang.Iterable
public interface AliasDictionary extends DictionaryBase, Iterable<String>
Defines interface of a dictionary of aliases.
Learn more
Methods
Method | Description |
---|---|
getCount() | Gets the number of aliases contained in the AliasDictionary . |
addRange(Iterable |
Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary . |
addRange(AliasReplacementPair[] pairs) | Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary . |
add(String alias, String text) | Adds the specified pair of alias and associated text to this instance of the AliasDictionary . |
remove(String alias) | Removes the specified alias from an AliasDictionary object. |
contains(String alias) | Determines whether an AliasDictionary object contains the specified alias. |
getText(String alias) | Gets a text that is associated with the specified alias. |
clear() | Removes all aliases from a AliasDictionary object. |
iterator() | Returns an iterator that iterates through the collection. |
getCount()
public abstract int getCount()
Gets the number of aliases contained in the AliasDictionary .
Returns: int - The number of aliases contained in the AliasDictionary .
addRange(Iterable pairs)
public abstract void addRange(Iterable<AliasReplacementPair> pairs)
Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary .
Parameters:
Parameter | Type | Description |
---|---|---|
pairs | java.lang.Iterable<com.groupdocs.search.dictionaries.AliasReplacementPair> | The collection of alias/replacement pairs to add to the dictionary. |
addRange(AliasReplacementPair[] pairs)
public abstract void addRange(AliasReplacementPair[] pairs)
Adds the specified collection of alias/replacement pairs to this instance of the AliasDictionary .
Parameters:
Parameter | Type | Description |
---|---|---|
pairs | AliasReplacementPair[] | The collection of alias/replacement pairs to add to the dictionary. |
add(String alias, String text)
public abstract void add(String alias, String text)
Adds the specified pair of alias and associated text to this instance of the AliasDictionary .
Parameters:
Parameter | Type | Description |
---|---|---|
alias | java.lang.String | The alias to add to the dictionary. |
text | java.lang.String | The text to be associated with the alias. |
remove(String alias)
public abstract boolean remove(String alias)
Removes the specified alias from an AliasDictionary object.
Parameters:
Parameter | Type | Description |
---|---|---|
alias | java.lang.String | The alias to remove. |
Returns: boolean - 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(String alias)
public abstract boolean contains(String alias)
Determines whether an AliasDictionary object contains the specified alias.
Parameters:
Parameter | Type | Description |
---|---|---|
alias | java.lang.String | The alias to locate in the AliasDictionary object. |
Returns: boolean - true if the AliasDictionary object contains the specified alias; otherwise, false .
getText(String alias)
public abstract String getText(String alias)
Gets a text that is associated with the specified alias.
Parameters:
Parameter | Type | Description |
---|---|---|
alias | java.lang.String | The alias to locate in the AliasDictionary object. |
Returns: java.lang.String - 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.
Returns: java.util.Iterator<java.lang.String> - An iterator that can be used to iterate through the collection.