Package org.basex.query.value.type
Class MapType
java.lang.Object
org.basex.query.value.type.FuncType
org.basex.query.value.type.MapType
- All Implemented Interfaces:
Type
Type for maps.
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Nested Class Summary
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncast(Item item, QueryContext qc, StaticContext sc, InputInfo ii) Casts the specified item to this type.booleanChecks if this type is equal to the given one.static MapTypeCreates a new map type.booleaninstanceOf(Type type) Checks if the current type is an instance of the specified type.Computes the intersection between this type and the given one, i.e.keyType()Returns the key type.toString()Computes the union between this type and the given one, i.e.Methods inherited from class org.basex.query.value.type.FuncType
atomic, cast, castString, find, get, get, get, id, isNumber, isNumberOrUntyped, isSortable, isStringOrUntyped, isUntyped, nsSensitive, seqType, similar
-
Field Details
-
MAP
public static final byte[] MAPName.
-
-
Method Details
-
cast
Description copied from interface:TypeCasts the specified item to this type.- Specified by:
castin interfaceType- Overrides:
castin classFuncType- Parameters:
item- item to be convertedqc- query contextsc- static contextii- input info- Returns:
- cast value
- Throws:
QueryException- query exception
-
eq
Description copied from interface:TypeChecks if this type is equal to the given one. -
instanceOf
Description copied from interface:TypeChecks if the current type is an instance of the specified type.- Specified by:
instanceOfin interfaceType- Overrides:
instanceOfin classFuncType- Parameters:
type- type to be checked- Returns:
- result of check
-
union
Description copied from interface:TypeComputes the union between this type and the given one, i.e. the least common ancestor of both types in the type hierarchy. -
intersect
Description copied from interface:TypeComputes the intersection between this type and the given one, i.e. the least specific type that is sub-type of both types. If no such type exists,nullis returned. -
keyType
Returns the key type.- Returns:
- key type
-
get
Creates a new map type.- Parameters:
keyType- key typedeclType- declared return type- Returns:
- map type
-
toString
-