Class SequenceType


  • public class SequenceType
    extends java.lang.Object
    A SequenceType is the combination of an ItemType and an OccurrenceIndicator
    • Field Detail

      • ANY

        public static final SequenceType ANY
        Constant representing the universal sequence type item()*, which permits any value
      • EMPTY

        public static final SequenceType EMPTY
        Constant representing the sequence type empty-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 ItemType
        occurrenceIndicator - 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 class java.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 class java.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 s9api SequenceType from an underlying instance of SequenceType
        Since:
        10.0