public enum OccurrenceIndicator extends java.lang.Enum<OccurrenceIndicator>
Enum Constant and Description |
---|
ONE |
ONE_OR_MORE |
ZERO |
ZERO_OR_MORE |
ZERO_OR_ONE |
Modifier and Type | Method and Description |
---|---|
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.
|
protected int |
getCardinality() |
protected static OccurrenceIndicator |
getOccurrenceIndicator(int cardinality) |
boolean |
subsumes(OccurrenceIndicator other)
Ask whether one occurrence indicator subsumes another.
|
java.lang.String |
toString()
Return a string representation of the occurrence indicator: one of "*", "+", "?", "0" (exactly zero)
or empty string (exactly one)
|
static OccurrenceIndicator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OccurrenceIndicator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OccurrenceIndicator ZERO
public static final OccurrenceIndicator ZERO_OR_ONE
public static final OccurrenceIndicator ZERO_OR_MORE
public static final OccurrenceIndicator ONE
public static final OccurrenceIndicator ONE_OR_MORE
public static OccurrenceIndicator[] values()
for (OccurrenceIndicator c : OccurrenceIndicator.values()) System.out.println(c);
public static OccurrenceIndicator valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullprotected int getCardinality()
protected static OccurrenceIndicator getOccurrenceIndicator(int cardinality)
public boolean allowsZero()
ZERO
, ZERO_OR_ONE
,
or ZERO_OR_MORE
public boolean allowsMany()
ZERO_OR_MORE
or ONE_OR_MORE
public boolean subsumes(OccurrenceIndicator other)
A.subsumes(B)
is true if every sequence that satisfies the occurrence
indicator B also satisfies the occurrence indicator A.other
- The other occurrence indicatorpublic java.lang.String toString()
toString
in class java.lang.Enum<OccurrenceIndicator>
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.