Package com.adobe.xfa

Class ArrayNodeList

  • All Implemented Interfaces:
    Peer

    public final class ArrayNodeList
    extends NodeList
    An implementation of the NodeList interface that uses an ArrayList as its storage.
    • Constructor Detail

      • ArrayNodeList

        public ArrayNodeList()
        default constructor
      • ArrayNodeList

        public ArrayNodeList​(java.util.List<? extends Node> list)
        Create a new ArrayNodeList from an existing one.
        Parameters:
        list - to clone
      • ArrayNodeList

        public ArrayNodeList​(Element e)
        Create an ArrayNodeList from the children of an Element. All children of the element will be added to the list.
        Parameters:
        e - The Element to grab children from.
    • Method Detail

      • append

        public void append​(Obj newNode)
        Description copied from class: ListBase
        Appends an object to the end of this list.
        Specified by:
        append in class ListBase
        Parameters:
        newNode - the node to be appended.
        See Also:
        ListBase.append(Obj)
      • clone

        public java.lang.Object clone()
        Description copied from class: NodeList
        Creates a copy of this node list.

        This method does not make copies of the underlying object implementations, it just place them in a new storage.

        Specified by:
        clone in class NodeList
        Returns:
        a new node list.
      • getClassAtom

        public java.lang.String getClassAtom()
        Description copied from class: Obj
        Returns the atomic name of this element's class.
        Overrides:
        getClassAtom in class ListBase
        Returns:
        the class name as an interned string.
        See Also:
        Obj.getClassAtom()
      • getClassName

        public java.lang.String getClassName()
        Description copied from class: Obj
        Gets the name of this object's class. Overriden by derived classes such as Element that have a local name that may be returned instead.
        Overrides:
        getClassName in class ListBase
        Returns:
        the class name.
        See Also:
        Obj.getClassName()
      • getNamedItem

        public Node getNamedItem​(java.lang.String name)
        Description copied from class: NodeList
        Gets the first child of this node list with the given name.
        Specified by:
        getNamedItem in class NodeList
        Parameters:
        name - the name of the child node.
        Returns:
        the first child of this node with the given name.
      • getNamedItem

        public Node getNamedItem​(java.lang.String aName,
                                 java.lang.String aClassName,
                                 int nTargetOccurrence)
        Description copied from class: NodeList
        Get the first child of this node with the given name
        Specified by:
        getNamedItem in class NodeList
        Parameters:
        aName - the name of the node to search for.
        aClassName - the class of node to search for, ignored if null. If non-null, this String must be interned.
        nTargetOccurrence - the occurrence to search for.
        Returns:
        the first child of this node with the given name and classname.
        See Also:
        NodeList.getNamedItem(String, String, int)
      • insert

        public void insert​(Obj newNode,
                           Obj refNode)
        Description copied from class: ListBase
        Inserts an object before a specific node in this list.
        Specified by:
        insert in class ListBase
        Parameters:
        newNode - the object to be inserted.
        refNode - the object to insert before.
        See Also:
        ListBase.insert(Obj, Obj)
      • item

        public Obj item​(int index)
        Description copied from class: ListBase
        Gets this list's n'th object.
        Specified by:
        item in class ListBase
        Parameters:
        index - the 0-based index of the node within this list.
        Returns:
        the n'th node.
        See Also:
        ListBase.item(int)
      • length

        public int length()
        Description copied from class: ListBase
        Returns the number of objects in this list.
        Specified by:
        length in class ListBase
        Returns:
        the length of this list.
        See Also:
        ListBase.length()
      • remove

        public void remove​(Obj removeNode)
        Description copied from class: ListBase
        Removes an object from this list.
        Specified by:
        remove in class ListBase
        Parameters:
        removeNode - the object to be removed.
        See Also:
        ListBase.remove(Obj)