NodeCollection

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

NameTypeAccessDescription
countintReadGets the count.

Methods

SignatureDescription
get(index: int) → NodeCalls 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) → booleanDetermines whether a node is in the collection.
indexOf(node: Node) → intReturns 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() → intReturns the count.

See Also