Package org.basex.query.value.item
Class Bln
- java.lang.Object
-
- org.basex.query.expr.ExprInfo
-
- org.basex.query.expr.Expr
-
- org.basex.query.value.Value
-
- org.basex.query.value.item.Item
-
- org.basex.query.value.item.Bln
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
bool(InputInfo ii)
Returns a boolean representation of the value.int
compare(Item item, Collation coll, boolean transitive, InputInfo ii)
Compares the current and the specified item.double
dbl(InputInfo ii)
Returns a double representation of the value.BigDecimal
dec(InputInfo ii)
Returns a decimal representation of the value.boolean
equal(Item item, Collation coll, InputInfo ii)
Compares items for equality.boolean
equals(Object obj)
This function is e.g.float
flt(InputInfo ii)
Returns a float representation of the value.static Bln
get(boolean value)
Returns a static item instance.static Bln
get(double score)
Constructor, adding a full-text score.int
hash()
Returns a hash code for an atomic item.long
itr(InputInfo ii)
Returns an integer (long) representation of the value.static Boolean
parse(byte[] value)
Converts the specified string to a boolean.static boolean
parse(Item item, InputInfo info)
Converts the specified item to a boolean.double
score()
Returns a score value.byte[]
string(InputInfo ii)
Returns a string representation of the value.Boolean
toJava()
Returns a Java representation of the value.void
toString(QueryString qs)
Creates a query string.void
write(DataOutput out)
Writes the data structure to disk.-
Methods inherited from class org.basex.query.value.item.Item
atomicEqual, atomItem, atomValue, cache, comparable, ddo, deepEqual, description, input, instanceOf, isItem, item, itemAt, iter, materialize, materialized, refineType, refineType, reverse, sameType, seqType, size, stringInput, subsequence, test, toXml, typeId, xdmInfo
-
Methods inherited from class org.basex.query.value.Value
accept, checkUp, compile, copy, count, exprSize, has, inline, inlineable, isEmpty, iter, iterator, refineType, serialize, serialize, serialize, value
-
Methods inherited from class org.basex.query.expr.Expr
arg, args, atomIter, data, funcType, hasFreeVars, indexAccessible, info, isSimple, markTailCalls, mergeEbv, optimize, optimizePos, simplify, simplifyFor, typeCheck, uses, vacuous, visitAll
-
Methods inherited from class org.basex.query.expr.ExprInfo
info, toErrorString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
get
public static Bln get(double score)
Constructor, adding a full-text score.- Parameters:
score
- score value- Returns:
- item
-
get
public static Bln get(boolean value)
Returns a static item instance.- Parameters:
value
- boolean value- Returns:
- item
-
write
public void write(DataOutput out) throws IOException
Description copied from class:Value
Writes the data structure to disk.- Overrides:
write
in classItem
- Parameters:
out
- data output- Throws:
IOException
- I/O exception
-
string
public byte[] string(InputInfo ii)
Description copied from class:Item
Returns a string representation of the value.
-
hash
public int hash()
Description copied from class:Item
Returns a hash code for an atomic item. The returned values must be suitable for comparison according to the deep-equal rules.
-
bool
public boolean bool(InputInfo ii)
Description copied from class:Item
Returns a boolean representation of the value.
-
itr
public long itr(InputInfo ii)
Description copied from class:Item
Returns an integer (long) representation of the value.
-
flt
public float flt(InputInfo ii)
Description copied from class:Item
Returns a float representation of the value.
-
dbl
public double dbl(InputInfo ii)
Description copied from class:Item
Returns a double representation of the value.
-
dec
public BigDecimal dec(InputInfo ii)
Description copied from class:Item
Returns a decimal representation of the value.
-
equal
public boolean equal(Item item, Collation coll, InputInfo ii) throws QueryException
Description copied from class:Item
Compares items for equality. Called byCmpV.OpV
.- Specified by:
equal
in classItem
- Parameters:
item
- item to be comparedcoll
- collation (can benull
)ii
- input info (can benull
)- Returns:
- result of check
- Throws:
QueryException
- query exception
-
compare
public int compare(Item item, Collation coll, boolean transitive, InputInfo ii) throws QueryException
Description copied from class:Item
Compares the current and the specified item.- Overrides:
compare
in classItem
- Parameters:
item
- item to be comparedcoll
- collation (can benull
)transitive
- transitive comparisonii
- input info (can benull
)- Returns:
- difference
- Throws:
QueryException
- query exception
-
score
public double score()
Description copied from class:Item
Returns a score value. Overwritten byFTNode
.
-
toJava
public Boolean toJava()
Description copied from class:Value
Returns a Java representation of the value.
-
equals
public boolean equals(Object obj)
Description copied from class:Expr
This function is e.g. called by:If.optimize(CompileContext)
,Switch.optimize(CompileContext)
,Typeswitch.optimize(CompileContext)
, in order to discard identical expressions.CmpR.mergeEbv(Expr, boolean, CompileContext)
orCmpSR.mergeEbv(Expr, boolean, CompileContext)
, in order to merge expressions with identical input.CmpG.optimize(CompileContext)
orCmpV.optimize(CompileContext)
, in order to pre-evaluate equality tests.CmpG.optimize(CompileContext)
, in order to compare the start and end value.PathCache
, in order to find identical root values at runtime.
-
toString
public void toString(QueryString qs)
Description copied from class:ExprInfo
Creates a query string.
-
parse
public static boolean parse(Item item, InputInfo info) throws QueryException
Converts the specified item to a boolean.- Parameters:
item
- item to be convertedinfo
- input info (can benull
)- Returns:
- resulting boolean value
- Throws:
QueryException
- query exception
-
parse
public static Boolean parse(byte[] value)
Converts the specified string to a boolean.- Parameters:
value
- string to be converted- Returns:
- boolean value or
null
-
-