public static enum SeqType.Occ extends Enum<SeqType.Occ>
Enum Constant and Description |
---|
ONE
Exactly one.
|
ONE_MORE
One or more.
|
ZERO
Zero.
|
ZERO_MORE
Zero or more.
|
ZERO_ONE
Zero or one.
|
Modifier and Type | Field and Description |
---|---|
int |
max
Maximal number of occurrences.
|
int |
min
Minimal number of occurrences.
|
Modifier and Type | Method and Description |
---|---|
boolean |
check(long card)
Checks if the given cardinality is supported by this type.
|
boolean |
instanceOf(SeqType.Occ occ)
Checks if the specified occurrence indicator is an instance of the
current occurrence indicator.
|
SeqType.Occ |
intersect(SeqType.Occ other)
Computes the intersection between this occurrence indicator and the given one.
|
String |
toString() |
SeqType.Occ |
union(SeqType.Occ other)
Computes the union between this occurrence indicator and the given one.
|
static SeqType.Occ |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SeqType.Occ[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SeqType.Occ ZERO
public static final SeqType.Occ ZERO_ONE
public static final SeqType.Occ ONE
public static final SeqType.Occ ONE_MORE
public static final SeqType.Occ ZERO_MORE
public final int min
public final int max
public static SeqType.Occ[] values()
for (SeqType.Occ c : SeqType.Occ.values()) System.out.println(c);
public static SeqType.Occ 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 nullpublic boolean instanceOf(SeqType.Occ occ)
occ
- occurrence indicator to checkpublic SeqType.Occ intersect(SeqType.Occ other)
ZERO
and ONE
), null
is
returned.other
- other occurrence indicatornull
public SeqType.Occ union(SeqType.Occ other)
other
- other occurrence indicatorpublic boolean check(long card)
card
- cardinalitypublic String toString()
toString
in class Enum<SeqType.Occ>
Copyright © 2005–2015 BaseX Team. All rights reserved.