java.io.Serializable
, java.lang.Comparable<OccurrenceIndicator>
public enum OccurrenceIndicator extends java.lang.Enum<OccurrenceIndicator>
Enum Constant | Description |
---|---|
ONE |
|
ONE_OR_MORE |
|
ZERO |
|
ZERO_OR_MORE |
|
ZERO_OR_ONE |
Modifier and Type | Method | 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(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 indicator