VariableCollection
Overview
VariableCollection is a class in Aspose.Words FOSS for Java.
Inherits from: Iterable<Map.Entry<String, String>>.
A collection of document variables.
Edition status of its 11 listed members (a property and its accessor methods are listed separately, overloads once): 11 not yet exercised by a verified example.
This class declares 12 methods for VariableCollection objects in Java programs.
Available methods include: add, clear, contains, get, getCount, indexOfKey, iterator, remove, removeAt, set.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: count.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
count | int | Read | Gets the number of elements contained in the collection. |
Methods
| Signature | Description |
|---|---|
getCount() → int | Gets the number of elements contained in the collection. |
get(name: String) → String | Gets or a sets a document variable by the case-insensitive name. |
set(name: String, value: String) | Calls set(name, value) on this VariableCollection instance. |
get(index: int) → String | Gets or sets a document variable at the specified index. |
set(index: int, value: String) | Calls set(index, value) on this VariableCollection instance. |
iterator() → Iterator<Map.Entry<String, String>> | Returns an enumerator object that can be used to iterate over all variable in the collection. |
add(name: String, value: String) | Adds a document variable to the collection. |
contains(name: String) → boolean | Determines whether the collection contains a document variable with the given name. |
indexOfKey(name: String) → int | Returns the zero-based index of the specified document variable in the collection. |
remove(name: String) | Removes a document variable with the specified name from the collection. |
removeAt(index: int) | Removes a document variable at the specified index. |
clear() | Removes all elements from the collection. |