public class VariableCollection
extends java.lang.Object
implements java.lang.Iterable
To learn more, visit the Work with Document Properties documentation article.
Variable names and values are strings.
Variable names are case-insensitive.
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
get(int index)
Gets a document variable at the specified index.
|
java.lang.String |
get(java.lang.String name)
|
int |
getCount()
Gets the number of elements contained in the collection.
|
int |
indexOfKey(java.lang.String name)
Returns the zero-based index of the specified document variable in the collection.
|
java.util.Iterator |
iterator()
Returns an enumerator object that can be used to iterate over all variable 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.
|
void |
set(int index,
java.lang.String value)
Sets a document variable at the specified index.
|
void |
set(java.lang.String name,
java.lang.String value)
|
public int getCount()
public java.lang.String get(java.lang.String name)
String value.public void set(java.lang.String name,
java.lang.String value)
value - The corresponding String value.public java.lang.String get(int index)
index - Zero-based index of the document variable.public void set(int index,
java.lang.String value)
index - Zero-based index of the document variable.value - A document variable at the specified index.public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic 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.public boolean contains(java.lang.String name)
name - Case-insensitive name of the document variable to locate.public int indexOfKey(java.lang.String name)
name - The case-insensitive name of the variable.public void remove(java.lang.String name)
name - The case-insensitive name of the variable.public void removeAt(int index)
index - The zero based index.public void clear()