|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<OccurrenceIndicator> net.sf.saxon.s9api.OccurrenceIndicator
public 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 Summary | |
---|---|
ONE
|
|
ONE_OR_MORE
|
|
ZERO
|
|
ZERO_OR_MORE
|
|
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. |
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)
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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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
Method Detail |
---|
public static OccurrenceIndicator[] values()
for (OccurrenceIndicator c : OccurrenceIndicator.values()) System.out.println(c);
public static OccurrenceIndicator valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
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 indicator
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |