Package net.sf.saxon.ma.map
Interface TupleType
-
- All Superinterfaces:
FunctionItemType,ItemType
- All Known Implementing Classes:
TupleItemType
public interface TupleType extends FunctionItemType
An instance of this class represents a specific tuple item type, for example tuple(x: xs:double, y: element(employee)). Tuple types are a Saxon extension introduced in Saxon 9.8. The syntax for constructing a tuple type requires Saxon-PE or higher, but the supporting code is included in Saxon-HE for convenience.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sf.saxon.type.ItemType
ItemType.WithSequenceTypeCache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<String>getFieldNames()Get the names of all the fieldsSequenceTypegetFieldType(String field)Get the type of a given fieldbooleanisExtensible()Ask whether the tuple type is extensible, that is, whether fields other than those named are permittedbooleanisOptional(String field)Ask whether a particular field is optional (that is, allowed to be absent from the map)-
Methods inherited from interface net.sf.saxon.type.FunctionItemType
getAnnotationAssertions, getArgumentTypes, getGenre, getResultType, isArrayType, isMapType, makeFunctionSequenceCoercer, relationship
-
Methods inherited from interface net.sf.saxon.type.ItemType
explainMismatch, generateJavaScriptItemTypeAcceptor, generateJavaScriptItemTypeTest, getAlphaCode, getAtomizedItemType, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainType, isTrueItemType, matches, toExportString, toString
-
-
-
-
Method Detail
-
getFieldNames
Iterable<String> getFieldNames()
Get the names of all the fields- Returns:
- the names of the fields (in arbitrary order)
-
getFieldType
SequenceType getFieldType(String field)
Get the type of a given field- Parameters:
field- the name of the field- Returns:
- the type of the field if it is defined, or null otherwise
-
isOptional
boolean isOptional(String field)
Ask whether a particular field is optional (that is, allowed to be absent from the map)- Parameters:
field- the name of the field- Returns:
- true if the field is optional
-
isExtensible
boolean isExtensible()
Ask whether the tuple type is extensible, that is, whether fields other than those named are permitted- Returns:
- true if fields other than the named fields are permitted to appear
-
-