Modifier and Type | Interface and Description |
---|---|
static class |
Type.ID
Type IDs for client/server communication.
|
Modifier and Type | Method and Description |
---|---|
Value |
cast(Item item,
QueryContext qc,
StaticContext sc,
InputInfo ii)
Casts the specified item to this item type.
|
Value |
cast(Object value,
QueryContext qc,
StaticContext sc,
InputInfo ii)
Casts the specified Java value to this item type.
|
Value |
castString(String value,
QueryContext qc,
StaticContext sc,
InputInfo ii)
Casts the specified string to this item type.
|
boolean |
eq(Type type)
Checks if this type is equal to the given one.
|
Type.ID |
id()
Returns a type id to differentiate all types.
|
boolean |
instanceOf(Type type)
Checks if the current type is an instance of the specified type.
|
Type |
intersect(Type type)
Computes the intersection between this type and the given one, i.e. the least
specific type that is sub-type of both types.
|
boolean |
isNumber()
Checks if the type refers to a number.
|
boolean |
isNumberOrUntyped()
Checks if the type refers to a number or an untyped item.
|
boolean |
isStringOrUntyped()
Checks if the type refers to a number or a string.
|
boolean |
isUntyped()
Checks if the type refers to an untyped item.
|
boolean |
nsSensitive()
Checks if the type is namespace-sensitive.
|
SeqType |
seqType()
Returns a sequence type with this item type.
|
byte[] |
string()
Returns the string representation of this type.
|
String |
toString() |
Type |
union(Type type)
Computes the union between this type and the given one, i.e. the least common
ancestor of both types in the type hierarchy.
|
Value cast(Item item, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException
item
- item to be convertedqc
- query contextsc
- static contextii
- input infoQueryException
- query exceptionValue cast(Object value, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException
value
- Java valueqc
- query contextsc
- static contextii
- input infoQueryException
- query exceptionValue castString(String value, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException
value
- string objectqc
- query contextsc
- static contextii
- input infoQueryException
- query exceptionSeqType seqType()
boolean eq(Type type)
type
- other typetrue
if both types are equal, false
otherwiseboolean instanceOf(Type type)
type
- type to be checkedType union(Type type)
type
- other typeType intersect(Type type)
null
is
returned.type
- other typenull
boolean isNumber()
boolean isUntyped()
boolean isNumberOrUntyped()
boolean isStringOrUntyped()
byte[] string()
Type.ID id()
boolean nsSensitive()
Copyright © 2005–2015 BaseX Team. All rights reserved.