|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.expr.Expr
org.basex.query.value.Value
org.basex.query.value.item.Item
org.basex.query.value.item.FItem
org.basex.query.value.map.Map
public final class Map
The map item.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary | |
---|---|
static Map |
EMPTY
The empty map. |
Fields inherited from class org.basex.query.value.item.Item |
---|
score, UNDEF |
Fields inherited from class org.basex.query.value.Value |
---|
type |
Method Summary | |
---|---|
Map |
addAll(Map other,
InputInfo ii)
Adds all bindings from the given map into this . |
int |
arity()
Number of arguments this function takes. |
Map |
coerceTo(FuncType ft,
QueryContext ctx,
InputInfo ii)
Coerces this function item to the given function type. |
Str |
collation()
Collation of this map. |
Bln |
contains(Item k,
InputInfo ii)
Checks if the given key exists in the map. |
boolean |
deep(InputInfo ii,
Map o)
Checks if the this map is deep-equal to the given one. |
Map |
delete(Item key,
InputInfo ii)
Deletes a key from this map. |
java.lang.String |
description()
Returns a string description of the expression. |
QNm |
fName()
Name of this function, null means anonymous function. |
FuncType |
funcType()
Type of this function. |
Value |
get(Item key,
InputInfo ii)
Gets the value from this map. |
int |
hash(InputInfo ii)
Returns a hash code for this value. |
boolean |
hasType(MapType t)
Checks if the map has the given type. |
Map |
insert(Item k,
Value v,
InputInfo ii)
Inserts the given value into this map. |
Value |
invValue(QueryContext ctx,
InputInfo ii,
Value... args)
Invokes this function with the given arguments. |
Value |
keys()
All keys defined in this map. |
Int |
mapSize()
Number of values contained in this map. |
void |
plan(FElem plan)
Creates an expression tree. |
java.util.HashMap<java.lang.Object,java.lang.Object> |
toJava()
Returns a Java representation of the value. |
TokenMap |
tokenMap(InputInfo ii)
Converts the map to a map with keys and values represented as tokens. |
java.lang.String |
toString()
|
Methods inherited from class org.basex.query.value.item.FItem |
---|
eq, invItem, string |
Methods inherited from class org.basex.query.value.item.Item |
---|
bool, castErr, comparable, dbl, dec, diff, ebv, equiv, flt, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, score, score, size, test, type, typeId, writeTo, xdmInfo |
Methods inherited from class org.basex.query.value.Value |
---|
accept, cache, checkUp, compile, copy, count, data, 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, isVacuous, markTailCalls, optimize, sameAs, 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 |
Field Detail |
---|
public static final Map EMPTY
Method Detail |
---|
public int arity()
XQFunction
public QNm fName()
XQFunction
null
means anonymous function.
null
public FuncType funcType()
XQFunction
public Value invValue(QueryContext ctx, InputInfo ii, Value... args) throws QueryException
XQFunction
ctx
- query contextii
- input infoargs
- arguments
QueryException
- query exceptionpublic Map delete(Item key, InputInfo ii) throws QueryException
key
- key to deleteii
- input info
this
otherwise
QueryException
- query exceptionpublic Value get(Item key, InputInfo ii) throws QueryException
key
- key to look forii
- input info
()
otherwise
QueryException
- query exceptionpublic Bln contains(Item k, InputInfo ii) throws QueryException
k
- key to look forii
- input info
true()
, if the key exists, false()
otherwise
QueryException
- query exceptionpublic Map addAll(Map other, InputInfo ii) throws QueryException
this
.
other
- map to addii
- input info
this
otherwise
QueryException
- query exceptionpublic boolean hasType(MapType t)
t
- type
true
if the type fits, false
otherwisepublic Map coerceTo(FuncType ft, QueryContext ctx, InputInfo ii) throws QueryException
FItem
coerceTo
in class FItem
ft
- function typectx
- query contextii
- input info
QueryException
- query exceptionpublic Map insert(Item k, Value v, InputInfo ii) throws QueryException
k
- key to insertv
- value to insertii
- input info
this
otherwise
QueryException
- query exceptionpublic Int mapSize()
public Value keys()
public Str collation()
public boolean deep(InputInfo ii, Map o) throws QueryException
ii
- input infoo
- other map
QueryException
- query exceptionpublic TokenMap tokenMap(InputInfo ii) throws QueryException
ii
- input info
QueryException
- query exceptionpublic java.util.HashMap<java.lang.Object,java.lang.Object> toJava() throws QueryException
Value
toJava
in class FItem
QueryException
- query exceptionpublic int hash(InputInfo ii) throws QueryException
Value
hash
in class Item
ii
- input info
QueryException
- if atomization can't be applied (e.g. function item)public java.lang.String description()
ExprInfo
ExprInfo.toString()
method,
arguments are not included in the output.
description
in class Item
public void plan(FElem plan)
ExprInfo
plan
in class FItem
plan
- root elementpublic java.lang.String toString()
toString
in class ExprInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |