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 SequenceType
Constant representing the universal sequence typeitem()*
, which permits any valuestatic final SequenceType
Constant representing the sequence typeempty-sequence()
, which permits only one value, namely the empty sequence -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Test whether two SequenceType objects represent the same typestatic SequenceType
fromUnderlyingSequenceType
(Processor processor, SequenceType st) Factory method to construct a s9apiSequenceType
from an underlying instance ofSequenceType
Get the item typeGet the occurrence indicatorGet the underlying internal SequenceTypefinal int
hashCode()
Get a hash code with semantics corresponding to the equals() methodstatic SequenceType
makeSequenceType
(ItemType itemType, OccurrenceIndicator occurrenceIndicator) Factory method to construct a SequenceTypeboolean
Test 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
value
is an instance of this type, as defined by the XPathinstance of
operator - 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 s9apiSequenceType
from an underlying instance ofSequenceType
- Parameters:
processor
- the processorst
- the internal SequenceType- Returns:
- the s9api SequenceType
- Since:
- 10.0
-