Package net.sf.saxon.s9api
Class SequenceType
java.lang.Object
net.sf.saxon.s9api.SequenceType
A SequenceType is the combination of an ItemType and an OccurrenceIndicator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SequenceTypeConstant representing the universal sequence typeitem()*, which permits any valuestatic final SequenceTypeConstant representing the sequence typeempty-sequence(), which permits only one value, namely the empty sequence -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanTest whether two SequenceType objects represent the same typestatic SequenceTypefromUnderlyingSequenceType(Processor processor, SequenceType st) Factory method to construct a s9apiSequenceTypefrom an underlying instance ofSequenceTypeGet the item typeGet the occurrence indicatorGet the underlying internal SequenceTypefinal inthashCode()Get a hash code with semantics corresponding to the equals() methodstatic SequenceTypemakeSequenceType(ItemType itemType, OccurrenceIndicator occurrenceIndicator) Factory method to construct a SequenceTypebooleanTest whether a supplied value is an instance of this SequenceType
-
Field Details
-
ANY
Constant representing the universal sequence typeitem()*, which permits any value -
EMPTY
Constant representing the sequence typeempty-sequence(), which permits only one value, namely the empty sequence
-
-
Method Details
-
makeSequenceType
public static SequenceType makeSequenceType(ItemType itemType, OccurrenceIndicator occurrenceIndicator) Factory method to construct a SequenceType- Parameters:
itemType- the ItemTypeoccurrenceIndicator- the permitted number of occurrences of the item in the sequence- Returns:
- the constricted SequenceType
-
getItemType
Get the item type- Returns:
- the item type
-
getOccurrenceIndicator
Get the occurrence indicator- Returns:
- the occurrence indicator
-
matches
Test whether a supplied value is an instance of this SequenceType- Parameters:
value- the value to be tested- Returns:
- true if
valueis an instance of this type, as defined by the XPathinstance ofoperator - Since:
- 12.0
-
equals
Test whether two SequenceType objects represent the same type -
hashCode
public final int hashCode()Get a hash code with semantics corresponding to the equals() method -
getUnderlyingSequenceType
Get the underlying internal SequenceType- Returns:
- the equivalent instance of
SequenceType
-
fromUnderlyingSequenceType
Factory method to construct a s9apiSequenceTypefrom an underlying instance ofSequenceType- Parameters:
processor- the processorst- the internal SequenceType- Returns:
- the s9api SequenceType
- Since:
- 10.0
-