Interface ElementList

All Superinterfaces:
ExtendedNodeList<DOMElement>, Iterable<DOMElement>, NodeList

public interface ElementList extends ExtendedNodeList<DOMElement>
DOMElement-specific ExtendedNodeList.

Contains the subset of child nodes that are elements.

  • Method Summary

    Modifier and Type
    Method
    Description
    item(int index)
    Given the subset of child nodes that are elements, access the element at the index position of this list, with the index starting with 0.

    Methods inherited from interface io.sf.carte.doc.dom.ExtendedNodeList

    contains, isEmpty

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator

    Methods inherited from interface org.w3c.dom.NodeList

    getLength
  • Method Details

    • item

      DOMElement item(int index)
      Given the subset of child nodes that are elements, access the element at the index position of this list, with the index starting with 0.

      For better performance, please use an iterator instead of this method.

      Specified by:
      item in interface ExtendedNodeList<DOMElement>
      Specified by:
      item in interface NodeList
      Parameters:
      index - the index.
      Returns:
      the element at the given position, or null if the specified index is beyond the last item or less than zero.