public enum OccurrenceIndicator extends 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.
|
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.
|
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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- 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 indicatorCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.