org.basex.query.value.seq
Class BlnSeq

java.lang.Object
  extended by org.basex.data.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.value.Value
              extended by org.basex.query.value.seq.Seq
                  extended by org.basex.query.value.seq.NativeSeq
                      extended by org.basex.query.value.seq.BlnSeq
All Implemented Interfaces:
java.lang.Iterable<Item>

public final class BlnSeq
extends NativeSeq

Sequence of items of type xs:boolean, containing at least two of them.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Flag
 
Field Summary
 
Fields inherited from class org.basex.query.value.Value
type
 
Method Summary
static Value get(boolean[] items)
          Creates a sequence with the specified items.
static Value get(Value[] vals, int size)
          Creates a sequence with the items in the specified expressions.
 Bln itemAt(long pos)
          Gets the item at the given position in the value.
 Value reverse()
          Returns a sequence in reverse order.
 boolean sameAs(Expr cmp)
          Compares the current and specified expression for equality.
 Value sub(long start, long length)
          Returns a subsequence.
 boolean[] toJava()
          Returns a Java representation of the value.
 
Methods inherited from class org.basex.query.value.seq.NativeSeq
ebv, homogeneous, type, writeTo
 
Methods inherited from class org.basex.query.value.seq.Seq
get, get, hash, item, iter, plan, size, test, toString
 
Methods inherited from class org.basex.query.value.Value
accept, cache, checkUp, compile, copy, count, data, description, exprSize, has, inline, isValue, iter, iterator, removable, serialize, value
 
Methods inherited from class org.basex.query.expr.Expr
addText, compEbv, copy, hasFreeVars, indexAccessible, indexEquivalent, inlineAll, isEmpty, isFunction, isItem, isVacuous, iterable, markTailCalls, optimize, uses, visitAll
 
Methods inherited from class org.basex.data.ExprInfo
addPlan, addPlan, info, planAttr, planElem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

itemAt

public Bln itemAt(long pos)
Description copied from class: Value
Gets the item at the given position in the value.

Specified by:
itemAt in class Value
Parameters:
pos - position
Returns:
item

sameAs

public boolean sameAs(Expr cmp)
Description copied from class: Expr
Compares the current and specified expression for equality.

Overrides:
sameAs in class Expr
Parameters:
cmp - expression to be compared
Returns:
result of check

toJava

public boolean[] toJava()
Description copied from class: Value
Returns a Java representation of the value.

Overrides:
toJava in class Seq
Returns:
Java object

sub

public Value sub(long start,
                 long length)
Description copied from class: Seq
Returns a subsequence.

Specified by:
sub in class Seq
Parameters:
start - first value
length - length of sequence
Returns:
resulting item or sequence

reverse

public Value reverse()
Description copied from class: Seq
Returns a sequence in reverse order.

Specified by:
reverse in class Seq
Returns:
sequence

get

public static Value get(boolean[] items)
Creates a sequence with the specified items.

Parameters:
items - items
Returns:
value

get

public static Value get(Value[] vals,
                        int size)
                 throws QueryException
Creates a sequence with the items in the specified expressions.

Parameters:
vals - values
size - size of resulting sequence
Returns:
value
Throws:
QueryException - query exception