java.lang.Objectcom.aspose.words.VariableCollection
public class VariableCollection
Variable names and values are strings. Variable names are case-insensitive.
Property Getters/Setters Summary | ||
---|---|---|
int | getCount() | |
Gets the number of elements contained in the collection. | ||
java.lang.String | get(int index) | |
void | set(int index, java.lang.String value) | |
Gets or sets a document variable at the specified index. null values are not allowed as a right hand side of the assignment and will be replaced by empty string. | ||
java.lang.String | get(java.lang.String name) | |
void | set(java.lang.String name, java.lang.String value) | |
Gets or a sets a document variable by the case-insensitive name. null values are not allowed as a right hand side of the assignment and will be replaced by empty string. |
Method Summary | ||
---|---|---|
void | add(java.lang.String name, java.lang.String value) | |
Adds a document variable to the collection. | ||
void | clear() | |
Removes all elements from the collection. | ||
boolean | contains(java.lang.String name) | |
Determines whether the collection contains a document variable with the given name. | ||
int | indexOfKey(java.lang.String name) | |
Returns the zero-based index of the specified document variable in the collection. | ||
java.util.Iterator | iterator() | |
Returns a dictionary iterator object that can be used to iterate over all items in the collection. | ||
void | remove(java.lang.String name) | |
Removes a document variable with the specified name from the collection. | ||
void | removeAt(int index) | |
Removes a document variable at the specified index. |
Property Getters/Setters Detail |
---|
getCount | |
public int getCount() |
get/set | |
public java.lang.String get(int index) / public void set(int index, java.lang.String value) |
index
- Zero-based index of the document variable.get/set | |
public java.lang.String get(java.lang.String name) / public void set(java.lang.String name, java.lang.String value) |
Method Detail |
---|
add | |
public void add(java.lang.String name, java.lang.String value) |
name
- The case-insensitive name of the variable to add.value
- The value of the variable. The value cannot be null, if value is null empty string will be used instead.clear | |
public void clear() |
contains | |
public boolean contains(java.lang.String name) |
name
- Case-insensitive name of the document variable to locate.indexOfKey | |
public int indexOfKey(java.lang.String name) |
name
- The case-insensitive name of the variable.iterator | |
public java.util.Iterator iterator() |
remove | |
public void remove(java.lang.String name) |
name
- The case-insensitive name of the variable.removeAt | |
public void removeAt(int index) |
index
- The zero based index.