Class ItemList

All Implemented Interfaces:
Iterable<Item>

public final class ItemList extends ObjectList<Item,ItemList>
Resizable-array implementation for items.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Constructor Details

    • ItemList

      public ItemList()
      Default constructor.
    • ItemList

      public ItemList(long capacity)
      Constructor with initial capacity.
      Parameters:
      capacity - array capacity
  • Method Details

    • add

      public ItemList add(Value value)
      Adds all items of a value to the array.
      Parameters:
      value - value to be added
      Returns:
      self reference
    • value

      public Value value()
      Returns a value containing the items in this list.
      Returns:
      the value
    • value

      public Value value(Type type)
      Returns a value with the type of the given expression.
      Parameters:
      type - type (can be null, only considered if new sequence is created)
      Returns:
      the value
    • value

      public Value value(Expr expr)
      Returns a value with the type of the given expression.
      Parameters:
      expr - expression
      Returns:
      the value
    • newArray

      protected Item[] newArray(int s)
      Description copied from class: ObjectList
      Creates a resized array.
      Specified by:
      newArray in class ObjectList<Item,ItemList>
      Parameters:
      s - size
      Returns:
      array