public abstract class DocumentPropertyCollection
extends java.lang.Object
implements java.lang.Iterable
BuiltInDocumentProperties and CustomDocumentProperties collections.
To learn more, visit the Work with Document Properties documentation article.
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
| Constructor and Description |
|---|
DocumentPropertyCollection() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all properties from the collection.
|
boolean |
contains(java.lang.String name)
Returns true if a property with the specified name exists in the collection.
|
DocumentProperty |
get(int index)
Returns a
DocumentProperty object by index. |
DocumentProperty |
get(java.lang.String name)
|
int |
getCount()
Gets number of items in the collection.
|
int |
indexOf(java.lang.String name)
Gets the index of a property by name.
|
java.util.Iterator |
iterator()
Returns an iterator object that can be used to iterate over all items in the collection.
|
void |
remove(java.lang.String name)
Removes a property with the specified name from the collection.
|
void |
removeAt(int index)
Removes a property at the specified index.
|
public int getCount()
public DocumentProperty get(java.lang.String name)
DocumentProperty object by the name of the property.
Returns null if a property with the specified name is not found.
name - The case-insensitive name of the property to retrieve.DocumentProperty value.public DocumentProperty get(int index)
DocumentProperty object by index.
Note: In Java this method is slow because iterates over all nodes.
index - Zero-based index of the DocumentProperty to retrieve.DocumentProperty object by index.public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic boolean contains(java.lang.String name)
name - The case-insensitive name of the property.public int indexOf(java.lang.String name)
Note: In Java this method is slow because iterates over all nodes.
name - The case-insensitive name of the property.public void remove(java.lang.String name)
name - The case-insensitive name of the property.public void removeAt(int index)
Note: In Java this method is slow because iterates over all nodes.
index - The zero based index.public void clear()