Enum Class OccurrenceIndicator

java.lang.Object
java.lang.Enum<OccurrenceIndicator>
net.sf.saxon.s9api.OccurrenceIndicator
All Implemented Interfaces:
Serializable, Comparable<OccurrenceIndicator>, Constable

public enum OccurrenceIndicator extends Enum<OccurrenceIndicator>
Represents one of the possible occurrence indicators in a SequenceType. The four standard values are ONE (no occurrence indicator), ZERO_OR_ONE (?), ZERO_OR_MORE (*), ONE_OR_MORE (+). In addition the value ZERO is supported, this is used only in the type empty-sequence() which matches an empty sequence and nothing else.
  • Enum Constant Details

  • Method Details

    • values

      public static OccurrenceIndicator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OccurrenceIndicator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCardinality

      protected int getCardinality()
    • getOccurrenceIndicator

      protected static OccurrenceIndicator getOccurrenceIndicator(int cardinality)
    • subsumes

      public boolean subsumes(OccurrenceIndicator other)
      Determine whether one occurrence indicator subsumes another. Specifically, A.subsumes(B) is true if every sequence that satisfies the occurrence indicator B also satisfies the occurrence indicator A.
      Parameters:
      other - The other occurrence indicator
      Returns:
      true if this occurrence indicator subsumes the other occurrence indicator
      Since:
      9.1