Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.query.item
Class Seq

    java.lang.Object
      org.basex.query.ExprInfo
          org.basex.query.expr.Expr
              org.basex.query.item.Item
                  org.basex.query.item.Seq

    public class Seq

extends Item

Item sequence.

Author:
  Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Nested Class Summary

Nested classes/interfaces inherited from class org.basex.query.expr.Expr
`Expr.Use`

Field Summary
`static Seq` | `EMPTY` Empty sequence.
`Item[]` | `val` Item array.

Fields inherited from class org.basex.query.item.Item
`score, type`

Method Summary
`Item` | `atomic(QueryContext ctx)` Evaluates the expression and returns the resulting item or a `null` reference.
`int` | `diff(Item it)` Returns the difference between the current and the specified item.
`boolean` | `duplicates(QueryContext ctx)` Returns true if the expression might yield duplicates and unsorted results.
`Item` | `ebv(QueryContext ctx)` Checks if the iterator can be dissolved into an effective boolean value.
`boolean` | `eq(Item it)` Checks the items for equality.
`static Item` | `get(Item[] v, int s)` Constructor.
`boolean` | `i()` Checks if this is an item.
`Iter` | `iter()` Returns an item iterator.
`Object` | `java()` Returns a Java object.
`void` | `plan(Serializer ser)` Recursively sends the abstract syntax of this expression to the specified serializer.
`Return` | `returned(QueryContext ctx)` Indicates the return type of an expression.
`void` | `serialize(Serializer ser)` Serializes the item.
`long` | `size(QueryContext ctx)` Returns the sequence size or 1.
`Item` | `test(QueryContext ctx)` Performs a predicate test and returns the item if test was successful.
`String` | `toString()`

Methods inherited from class org.basex.query.item.Item
`bool, comp, d, dbl, dec, flt, hashCode, iter, itr, n, name, node, removable, s, score, score, str, u, uses`

Methods inherited from class org.basex.query.expr.Expr
`addText, checkCtx, checkDbl, checkItr, e, indexAccessible, indexEquivalent, remove, sameAs, v`

Methods inherited from class org.basex.query.ExprInfo
`color, info`

Methods inherited from class java.lang.Object
`equals, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### EMPTY

    public static final Seq EMPTY

  Empty sequence.

### val

    public Item[] val

  Item array.

Method Detail

### get

    public static Item get(Item[] v,
                           int s)

  Constructor.

  Parameters:
    `v` - value
    `s` - size
  Returns:
    resulting item or sequence

### i

    public final boolean i()

  Description copied from class: `Expr`
  Checks if this is an item.

  Overrides:
    `i` in class `Item`
  Returns:
    result of check

### size

    public final long size(QueryContext ctx)

  Description copied from class: `Expr`
  Returns the sequence size or 1.

  Overrides:
    `size` in class `Item`
  Parameters:
    `ctx` - query context
  Returns:
    result of check

### java

    public Object java()

  Description copied from class: `Item`
  Returns a Java object.

  Overrides:
    `java` in class `Item`
  Returns:
    string representation

### iter

    public Iter iter()

  Description copied from class: `Item`
  Returns an item iterator.

  Overrides:
    `iter` in class `Item`
  Returns:
    iterator

### atomic

    public Item atomic(QueryContext ctx)
                throws QueryException

  Description copied from class: `Expr`
  Evaluates the expression and returns the resulting item or a `null` reference. If this method is not overwritten, `Expr.iter(org.basex.query.QueryContext)` must be implemented.

  Overrides:
    `atomic` in class `Item`
  Parameters:
    `ctx` - query context
  Returns:
    iterator
  Throws:
    `QueryException` - query exception

### ebv

    public Item ebv(QueryContext ctx)
             throws QueryException

  Description copied from class: `Expr`
  Checks if the iterator can be dissolved into an effective boolean value. If not, returns an error. If yes, returns the first value - which can be also be e.g. an integer, which is later evaluated as position predicate.

  Overrides:
    `ebv` in class `Item`
  Parameters:
    `ctx` - query context
  Returns:
    item
  Throws:
    `QueryException` - query exception

### test

    public Item test(QueryContext ctx)
              throws QueryException

  Description copied from class: `Expr`
  Performs a predicate test and returns the item if test was successful.

  Overrides:
    `test` in class `Item`
  Parameters:
    `ctx` - query context
  Returns:
    item
  Throws:
    `QueryException` - query exception

### eq

    public final boolean eq(Item it)
                     throws QueryException

  Description copied from class: `Item`
  Checks the items for equality.

  Specified by:
    `eq` in class `Item`
  Parameters:
    `it` - item to be compared
  Returns:
    result of check
  Throws:
    `QueryException` - query exception

### diff

    public final int diff(Item it)

  Description copied from class: `Item`
  Returns the difference between the current and the specified item.

  Overrides:
    `diff` in class `Item`
  Parameters:
    `it` - item to be compared
  Returns:
    difference

### serialize

    public final void serialize(Serializer ser)
                         throws IOException

  Description copied from class: `Item`
  Serializes the item.

  Overrides:
    `serialize` in class `Item`
  Parameters:
    `ser` - serializer
  Throws:
    `IOException` - I/O exception

### returned

    public final Return returned(QueryContext ctx)

  Description copied from class: `Expr`
  Indicates the return type of an expression. Called by the compiler to check if expressions can be reformulated. null is returned by default.

  Overrides:
    `returned` in class `Item`
  Parameters:
    `ctx` - query context
  Returns:
    result of check

### duplicates

    public final boolean duplicates(QueryContext ctx)

  Description copied from class: `Expr`
  Returns true if the expression might yield duplicates and unsorted results.

  Overrides:
    `duplicates` in class `Item`
  Parameters:
    `ctx` - query context
  Returns:
    result of check

### plan

    public final void plan(Serializer ser)
                    throws IOException

  Description copied from class: `ExprInfo`
  Recursively sends the abstract syntax of this expression to the specified serializer.

  Overrides:
    `plan` in class `Item`
  Parameters:
    `ser` - serializer
  Throws:
    `IOException` - I/O exception

### toString

    public final String toString()

  Overrides:
    `toString` in class `Item`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD