Package net.sf.saxon.s9api
Class SequenceType
- java.lang.Object
-
- net.sf.saxon.s9api.SequenceType
-
public class SequenceType extends java.lang.Object
A SequenceType is the combination of an ItemType and an OccurrenceIndicator
-
-
Field Summary
Fields Modifier and Type Field Description static SequenceType
ANY
Constant representing the universal sequence typeitem()*
, which permits any valuestatic SequenceType
EMPTY
Constant representing the sequence typeempty-sequence()
, which permits only one value, namely the empty sequence
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
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
ItemType
getItemType()
Get the item typeOccurrenceIndicator
getOccurrenceIndicator()
Get the occurrence indicatorSequenceType
getUnderlyingSequenceType()
Get the underlying internal SequenceTypeint
hashCode()
Get a hash code with semantics corresponding to the equals() methodstatic SequenceType
makeSequenceType(ItemType itemType, OccurrenceIndicator occurrenceIndicator)
Factory method to construct a SequenceType
-
-
-
Field Detail
-
ANY
public static final SequenceType ANY
Constant representing the universal sequence typeitem()*
, which permits any value
-
EMPTY
public static final SequenceType EMPTY
Constant representing the sequence typeempty-sequence()
, which permits only one value, namely the empty sequence
-
-
Method Detail
-
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
public ItemType getItemType()
Get the item type- Returns:
- the item type
-
getOccurrenceIndicator
public OccurrenceIndicator getOccurrenceIndicator()
Get the occurrence indicator- Returns:
- the occurrence indicator
-
equals
public final boolean equals(java.lang.Object other)
Test whether two SequenceType objects represent the same type- Overrides:
equals
in classjava.lang.Object
- Parameters:
other
- the other SequenceType object- Returns:
- true if the other object is a SequenceType representing the same type
- Since:
- 9.5
-
hashCode
public final int hashCode()
Get a hash code with semantics corresponding to the equals() method- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hash code
- Since:
- 9.5
-
getUnderlyingSequenceType
public SequenceType getUnderlyingSequenceType()
Get the underlying internal SequenceType- Returns:
- the equivalent instance of
SequenceType
-
fromUnderlyingSequenceType
public static SequenceType fromUnderlyingSequenceType(Processor processor, SequenceType st)
Factory method to construct a s9apiSequenceType
from an underlying instance ofSequenceType
- Since:
- 10.0
-
-