public class MapType extends AnyFunctionType
Modifier and Type | Field and Description |
---|---|
static MapType |
ANY_MAP_TYPE |
ANY_FUNCTION, SINGLE_FUNCTION
Constructor and Description |
---|
MapType(AtomicType keyType,
SequenceType valueType) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Test whether this function type equals another function type
|
SequenceType[] |
getArgumentTypes()
Get the argument types of this map, viewed as a function
|
int |
getArity()
Get the arity (number of arguments) of this function type
|
SequenceType |
getResultType()
Get the result type of this map, viewed as a function
|
ItemType |
getSuperType(TypeHierarchy th)
Get the type from which this item type is derived by restriction.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isMapType()
Ask whether this function item type is a map type.
|
Expression |
makeFunctionSequenceCoercer(Expression exp,
RoleLocator role,
TypeCheckerEnvironment visitor)
Create an expression whose effect is to apply function coercion to coerce a function from this type to another type
|
boolean |
matchesItem(Item item,
boolean allowURIPromotion,
Configuration config)
Test whether a given item conforms to this type
|
int |
relationship(FunctionItemType other,
TypeHierarchy th)
Determine the relationship of one function item type to another
|
String |
toString()
Produce a representation of this type name for use in error messages.
|
void |
visitNamedSchemaComponents(SchemaComponentVisitor visitor)
Visit all the schema components used in this ItemType definition
|
getAtomizedItemType, getDefaultPriority, getInstance, getPrimitiveItemType, getPrimitiveType, isAtomicType, isAtomizable, isPlainType, matches
public static final MapType ANY_MAP_TYPE
public MapType(AtomicType keyType, SequenceType valueType)
public boolean isMapType()
isMapType
in interface FunctionItemType
isMapType
in class AnyFunctionType
public int getArity()
public SequenceType[] getArgumentTypes()
getArgumentTypes
in interface FunctionItemType
getArgumentTypes
in class AnyFunctionType
public SequenceType getResultType()
getResultType
in interface FunctionItemType
getResultType
in class AnyFunctionType
public boolean matchesItem(Item item, boolean allowURIPromotion, Configuration config)
matchesItem
in interface ItemType
matchesItem
in class AnyFunctionType
item
- the item to be testedallowURIPromotion
- true if promotion from URI to string is allowedconfig
- the Saxon configurationpublic ItemType getSuperType(TypeHierarchy th)
getSuperType
in interface ItemType
getSuperType
in class AnyFunctionType
th
- the type hierarchy cachepublic String toString()
toString
in class AnyFunctionType
public boolean equals(Object other)
public int hashCode()
public int relationship(FunctionItemType other, TypeHierarchy th)
relationship
in interface FunctionItemType
relationship
in class AnyFunctionType
TypeHierarchy.SUBSUMES
, TypeHierarchy.SAME_TYPE
public Expression makeFunctionSequenceCoercer(Expression exp, RoleLocator role, TypeCheckerEnvironment visitor) throws XPathException
AnyFunctionType
makeFunctionSequenceCoercer
in interface FunctionItemType
makeFunctionSequenceCoercer
in class AnyFunctionType
exp
- the expression that delivers the supplied sequence of function items (the ones in need of coercion)role
- information for use in diagnosticsvisitor
- the expression visitor, supplies context informationXPathException
public void visitNamedSchemaComponents(SchemaComponentVisitor visitor) throws XPathException
visitNamedSchemaComponents
in interface ItemType
visitNamedSchemaComponents
in class AnyFunctionType
visitor
- the visitor class to be called when each component is visitedXPathException
- if an error occursCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.