public class TupleItemType extends AnyFunctionType implements TupleType
ItemType.WithSequenceTypeCacheANY_FUNCTION| Constructor and Description |
|---|
TupleItemType(java.util.List<java.lang.String> names,
java.util.List<SequenceType> types,
boolean extensible) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Test whether this function type equals another function type
|
java.util.Optional<java.lang.String> |
explainMismatch(Item item,
TypeHierarchy th)
Get extra diagnostic information about why a supplied item does not conform to this
item type, if available.
|
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
|
java.lang.String |
getBasicAlphaCode()
Get an alphabetic code representing the type, or at any rate, the nearest built-in type
from which this type is derived.
|
double |
getDefaultPriority()
Get the default priority when this ItemType is used as an XSLT pattern
|
java.lang.Iterable<java.lang.String> |
getFieldNames()
Get the names of all the fields
|
SequenceType |
getFieldType(java.lang.String field)
Get the type of a given field
|
Genre |
getGenre()
Determine the Genre (top-level classification) of this type
|
SequenceType |
getResultType()
Get the result type of this tuple type, viewed as a function
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isArrayType()
Ask whether this function item type is an array type.
|
boolean |
isExtensible()
Ask whether the tuple type is extensible, that is, whether fields other than those named are permitted
|
boolean |
isMapType()
Ask whether this function item type is a map type.
|
Expression |
makeFunctionSequenceCoercer(Expression exp,
RoleDiagnostic role)
Create an expression whose effect is to apply function coercion to coerce a function from this type to another type
|
boolean |
matches(Item item,
TypeHierarchy th)
Test whether a given item conforms to this type
|
Affinity |
relationship(FunctionItemType other,
TypeHierarchy th)
Determine the relationship of one function item type to another
|
java.lang.String |
toExportString()
Return a string representation of this ItemType suitable for use in stylesheet
export files.
|
java.lang.String |
toString()
Produce a representation of this type name for use in error messages.
|
getAnnotationAssertions, getAtomizedItemType, getInstance, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainTypeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAnnotationAssertionsgetAtomizedItemType, getFullAlphaCode, getNormalizedDefaultPriority, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainType, isTrueItemTypepublic TupleItemType(java.util.List<java.lang.String> names,
java.util.List<SequenceType> types,
boolean extensible)
public Genre getGenre()
getGenre in interface FunctionItemTypegetGenre in interface ItemTypeGenre.MAPpublic boolean isMapType()
isMapType in interface FunctionItemTypeisMapType in class AnyFunctionTypepublic boolean isArrayType()
isArrayType in interface FunctionItemTypeisArrayType in class AnyFunctionTypepublic java.lang.Iterable<java.lang.String> getFieldNames()
getFieldNames in interface TupleTypepublic SequenceType getFieldType(java.lang.String field)
getFieldType in interface TupleTypefield - the name of the fieldpublic boolean isExtensible()
isExtensible in interface TupleTypepublic boolean matches(Item item, TypeHierarchy th) throws XPathException
matches in interface ItemTypematches in class AnyFunctionTypeitem - The item to be testedth - type hierarchy dataXPathExceptionpublic int getArity()
public SequenceType[] getArgumentTypes()
getArgumentTypes in interface FunctionItemTypegetArgumentTypes in class AnyFunctionTypepublic SequenceType getResultType()
getResultType in interface FunctionItemTypegetResultType in class AnyFunctionTypepublic double getDefaultPriority()
getDefaultPriority in interface ItemTypegetDefaultPriority in class AnyFunctionTypepublic java.lang.String toString()
toString in interface ItemTypetoString in class AnyFunctionTypepublic java.lang.String toExportString()
toExportString in interface ItemTypepublic java.lang.String getBasicAlphaCode()
getBasicAlphaCode in interface ItemTypegetBasicAlphaCode in class AnyFunctionTypepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic Affinity relationship(FunctionItemType other, TypeHierarchy th)
relationship in interface FunctionItemTyperelationship in class AnyFunctionTypeAffinity.SUBSUMES, Affinity.SAME_TYPEpublic java.util.Optional<java.lang.String> explainMismatch(Item item, TypeHierarchy th)
explainMismatch in interface ItemTypeitem - the item being matchedth - the type hierarchy cachepublic Expression makeFunctionSequenceCoercer(Expression exp, RoleDiagnostic role) throws XPathException
AnyFunctionTypemakeFunctionSequenceCoercer in interface FunctionItemTypemakeFunctionSequenceCoercer in class AnyFunctionTypeexp - the expression that delivers the supplied sequence of function items (the ones in need of coercion)role - information for use in diagnosticsXPathExceptionCopyright (c) 2004-2021 Saxonica Limited. All rights reserved.