net.sf.saxon.s9api
public class OccurrenceIndicator extends Enum<OccurrenceIndicator>
Field Summary | |
---|---|
static OccurrenceIndicator | ONE |
static OccurrenceIndicator | ONE_OR_MORE |
static List<OccurrenceIndicator> | VALUES An immutable list containing the values comprising this enum class in the order they're declared. |
static OccurrenceIndicator | ZERO |
static OccurrenceIndicator | ZERO_OR_MORE |
static OccurrenceIndicator | ZERO_OR_ONE |
Method Summary | |
---|---|
boolean | allowsMany()
Ask whether this occurrence indicator permits a sequence containing more than one item. |
boolean | allowsZero()
Ask whether this occurrence indicator permits an empty sequence. |
List<OccurrenceIndicator> | family() Returns an immutable list containing the values comprising this enum class in the order they're declared. |
protected int | getCardinality() |
protected static OccurrenceIndicator | getOccurrenceIndicator(int cardinality) |
boolean | subsumes(OccurrenceIndicator other)
Ask whether one occurrence indicator subsumes another. |
static OccurrenceIndicator | valueOf(String name) Static factory to return the enum constant pertaining to the given string name. |
for(OccurrenceIndicator c : OccurrenceIndicator.VALUES) System.out.println(c);
Returns: true if the occurrence indicator is one of ZERO_OR_MORE or ONE_OR_MORE
Since: 9.2
Returns: true if the occurrence indicator is one of ZERO, ZERO_OR_ONE, or ZERO_OR_MORE
Since: 9.2
VALUES
. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to VALUES
.Returns: an immutable list containing the values comprising this enum class, in the order they're declared.
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
Throws: IllegalArgumentException if this enum class has no constant with the specified name.