NodeCollection
Overview
NodeCollection is a class in Aspose.Words FOSS for Java.
Inherits from: INodeCollection, Iterable<T>.
Represents a collection of nodes of a specific type.
Edition status of its 12 listed members (a property and its accessor methods are listed separately, overloads once): 11 not yet exercised by a verified example.
This class declares 11 methods for NodeCollection objects in Java programs.
Available methods include: add, clear, contains, get, getCount, indexOf, insert, iterator, remove, removeAt, toArray.
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 count. |
Methods
| Signature | Description |
|---|---|
get(index: int) → Node | Calls get(index) on this NodeCollection instance. |
add(node: Node) | Adds a node to the end of the collection. |
insert(index: int, node: Node) | Inserts a node into the collection at the specified index. |
remove(node: Node) | Removes the node from the collection and from the document. |
removeAt(index: int) | Removes the node at the specified index from the collection and from the document. |
clear() | Removes all nodes from this collection and from the document. |
contains(node: Node) → boolean | Determines whether a node is in the collection. |
indexOf(node: Node) → int | Returns the zero-based index of the specified node. |
toArray() → Node[] | Copies all nodes from the collection to a new array of nodes. |
iterator() → Iterator<T> | Provides a simple “foreach” style iteration over the collection of nodes. |
getCount() → int | Returns the count. |