public enum ListType extends Enum<ListType> implements Type
Enum Constant and Description |
---|
ENT
ENTITIES type.
|
IDR
IDREFS type.
|
NMT
NMTOKENS type.
|
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 t)
Checks if this type is equal to the given one.
|
static ListType |
find(QNm type)
Finds and returns the specified type.
|
Type.ID |
id()
Returns a type id to differentiate all types.
|
boolean |
instanceOf(Type t)
Checks if the current type is an instance of the specified type.
|
Type |
intersect(Type t)
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 t)
Computes the union between this type and the given one, i.e. the least common
ancestor of both types in the type hierarchy.
|
static ListType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ListType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ListType NMT
public static final ListType ENT
public static final ListType IDR
public static ListType[] values()
for (ListType c : ListType.values()) System.out.println(c);
public static ListType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final boolean isNumber()
Type
public final boolean isUntyped()
Type
public final boolean isNumberOrUntyped()
Type
isNumberOrUntyped
in interface Type
public final boolean isStringOrUntyped()
Type
isStringOrUntyped
in interface Type
public final byte[] string()
Type
public final Value cast(Item item, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException
Type
cast
in interface Type
item
- item to be convertedqc
- query contextsc
- static contextii
- input infoQueryException
- query exceptionpublic final Value cast(Object value, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException
Type
cast
in interface Type
value
- Java valueqc
- query contextsc
- static contextii
- input infoQueryException
- query exceptionpublic final Value castString(String value, QueryContext qc, StaticContext sc, InputInfo ii) throws QueryException
Type
castString
in interface Type
value
- string objectqc
- query contextsc
- static contextii
- input infoQueryException
- query exceptionpublic final SeqType seqType()
Type
public final boolean eq(Type t)
Type
public final boolean instanceOf(Type t)
Type
instanceOf
in interface Type
t
- type to be checkedpublic final Type union(Type t)
Type
public final Type intersect(Type t)
Type
null
is
returned.public final Type.ID id()
Type
public final boolean nsSensitive()
Type
nsSensitive
in interface Type
public final String toString()
Copyright © 2005–2015 BaseX Team. All rights reserved.