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.
|
String |
toString()
Return a string representation of the occurrence indicator: one of "*", "+", "?", "0" (exactly zero)
or empty string (exactly one)
|
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 indicatorpublic String toString()
toString
in class Enum<OccurrenceIndicator>
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.