Class BigSeq

All Implemented Interfaces:
Iterable<Item>

public final class BigSeq extends TreeSeq
A sequence containing more elements than fit into a SmallSeq.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Method Details

    • itemAt

      public Item itemAt(long index)
      Description copied from class: Value
      Returns the item at the given position in the value. The specified value must be lie within the valid bounds.
      Specified by:
      itemAt in class Value
      Parameters:
      index - position
      Returns:
      item
    • reverse

      public TreeSeq reverse(QueryContext qc)
      Description copied from class: Value
      Returns all items of this value in reverse order.
      Specified by:
      reverse in class Value
      Parameters:
      qc - query context
      Returns:
      items in reverse order
    • insert

      public TreeSeq insert(long pos, Item item, QueryContext qc)
      Description copied from class: Seq
      Inserts an item at the given position into this sequence and returns the resulting sequence.
      Specified by:
      insert in class Seq
      Parameters:
      pos - position at which the item should be inserted, must be between 0 and Seq.size
      item - item to insert
      qc - query context
      Returns:
      resulting value
    • remove

      public TreeSeq remove(long pos, QueryContext qc)
      Description copied from class: Seq
      Removes the item at the given position in this sequence and returns the resulting sequence.
      Specified by:
      remove in class Seq
      Parameters:
      pos - position of the item to remove, must be between 0 and Seq.size - 1
      qc - query context
      Returns:
      resulting sequence
    • subSeq

      protected Seq subSeq(long offset, long length, QueryContext qc)
      Description copied from class: Seq
      Returns a sub sequence of this value with the given start and length.
      Overrides:
      subSeq in class Seq
      Parameters:
      offset - offset (ge 0)
      length - number of items (1 lt length lt size())
      qc - query context
      Returns:
      sub sequence
    • concat

      public TreeSeq concat(TreeSeq seq)
      Description copied from class: TreeSeq
      Concatenates this sequence with another one. Running time: O(log (min { this.size(), other.size() }))
      Specified by:
      concat in class TreeSeq
      Parameters:
      seq - array to append to the end of this array
      Returns:
      resulting array
    • iterator

      public ListIterator<Item> iterator(long start)
      Description copied from class: TreeSeq
      Iterator over the members of this sequence.
      Specified by:
      iterator in class TreeSeq
      Parameters:
      start - starting position (i.e. the position initially returned by ListIterator.nextIndex())
      Returns:
      array over the array members
    • iter

      public BasicIter<Item> iter()
      Description copied from class: Value
      Returns an iterator.
      Specified by:
      iter in class TreeSeq
      Returns:
      iterator