public class AliasDictionary extends DictionaryBase implements Iterable<String>
Represents a dictionary of aliases.
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 |
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 |
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. |
public final int getCount()
Gets the number of aliases contained in the AliasDictionary
.
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
.
pairs
- The collection of key/value pairs to add to the dictionary.com.aspose.ms.System.ArgumentNullException
- Thrown when pairs
is null
.public final void add(String alias, String text)
Adds the specified pair of alias and associated text to this instance of the AliasDictionary
.
alias
- The alias to add to the dictionary.text
- The text to be associated with the alias.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.public final boolean remove(String alias)
Removes the specified alias from an AliasDictionary
object.
alias
- The alias to remove.true
if the alias is successfully found and removed.
This method returns false
if the alias is not found in the AliasDictionary
object.com.aspose.ms.System.ArgumentNullException
- Thrown when alias
is null
.public final boolean contains(String alias)
Determines whether a AliasDictionary
object contains the specified alias.
alias
- The alias to locate in the AliasDictionary
object.true
if the AliasDictionary
object contains the specified alias; otherwise, false
.com.aspose.ms.System.ArgumentNullException
- Thrown when alias
is null
.public final String getText(String alias)
Gets a text that is associated with the specified alias.
alias
- The alias to locate in the AliasDictionary
object.null
.com.aspose.ms.System.ArgumentNullException
- Thrown when alias
is null
.public final void clear()
Removes all aliases from a AliasDictionary
object.
public final void exportDictionary(String fileName)
Exports the alias dictionary to the specified text file.
fileName
- The file to export to.public final void importDictionary(String fileName)
Imports an alias dictionary from the specified text file.
fileName
- The file to import from.public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<String> iterator()
Returns an enumerator that iterates through the collection.
public final com.aspose.ms.System.Collections.IEnumerator iterator_Rename_Namesake()
Returns an enumerator that iterates through a collection.
IEnumerator
object that can be used to iterate through the collection.Copyright © 2019. All rights reserved.