com.aspose.note

Class CompositeNode<T extends INode>

    • Method Detail

      • isComposite

        public final boolean isComposite()

        Checks whether the node is composite. If true then the node can have child nodes.

        Overrides:
        isComposite in class Node
      • getFirstChild

        public T getFirstChild()

        Gets the first child node of this node.

      • getLastChild

        public T getLastChild()

        Gets the last child node of this node.

      • getChildren

        public List<T> getChildren()

        Gets all child nodes of this node as an enumerable collection.

      • iterator

        public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<T> iterator()

        Returns an enumerator that iterates through child nodes of the CompositeNode{T}.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<T extends INode>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<T extends INode>
        Specified by:
        iterator in interface Iterable<T extends INode>
        Returns:
        A T:IEnumerator`1 for the CompositeNode{T}.
      • appendChild

        public T appendChild(T newChild)

        Adds the node to the end of the list of child nodes for this node.

        Parameters:
        newChild - The node to add.
        Returns:
        The added node.
      • removeChild

        public T removeChild(T oldChild)

        Removes the child node.

        Parameters:
        oldChild - The node to remove.
        Returns:
        The removed node.
      • accept

        public void accept(DocumentVisitor visitor)

        Accepts the visitor of the node.

        Specified by:
        accept in interface INode
        Specified by:
        accept in class Node
        Parameters:
        visitor - The object of a class derived from the DocumentVisitor.
      • getChildNodes

        public <T1 extends NodeList<T1> getChildNodes(Class<T1> typeParameterClass)

        Get all child nodes by the node type.

        Specified by:
        getChildNodes in interface ICompositeNode
        Returns:
        A list of child nodes.

        T1: The type of elements in the returned list.

      • getText

        public String getText()

        Get all text from the node.

        Returns:
        All text in the node.