Class HTMLAllCollectionImpl

All Implemented Interfaces:
Iterable<Node>, Collection<Node>, List<Node>, SequencedCollection<Node>, HTMLAllCollection, ScriptableDelegate

public class HTMLAllCollectionImpl extends AbstractList<Node> implements HTMLAllCollection
The HTMLAllCollectionImpl class.
  • Constructor Details

    • HTMLAllCollectionImpl

      public HTMLAllCollectionImpl(NodeImpl rootNode, List<Node> nodeList)
  • Method Details

    • getLength

      public int getLength()
      Returns the number of elements in the collection.
      Specified by:
      getLength in interface HTMLAllCollection
      Returns:
      a Integer object.
    • item

      public Node item(Object index)
      Returns the item with index index from the collection (determined by tree order).
      Specified by:
      item in interface HTMLAllCollection
      Parameters:
      index - the name or index
      Returns:
      a Node object.
    • namedItem

      public Object namedItem(String name)
      Returns the item with ID or name name from the collection.

      If there are multiple matching items, then an HTMLCollection object containing all those elements is returned.

      Specified by:
      namedItem in interface HTMLAllCollection
      Parameters:
      name - the name
      Returns:
      a Object object.
    • tags

      public HTMLAllCollection tags(String tag)
      Returns all tags by name.
      Specified by:
      tags in interface HTMLAllCollection
      Parameters:
      tag - the name of tag
      Returns:
      a HTMLAllCollection object.
    • toString

      public String toString()
      Overrides:
      toString in class Object