public final class Multiplicity extends Object
For example, (0,unbounded) corresponds to the '*' occurence of DTD. (0,1) corresponds to the '?' occurence of DTD.
Modifier and Type | Field and Description |
---|---|
BigInteger |
max |
BigInteger |
min |
static Multiplicity |
ONE
the constant representing the (1,1) multiplicity.
|
static Multiplicity |
OPTIONAL
the constant representing the (0,1) multiplicity.
|
static Multiplicity |
PLUS
the constant representing the (1,unbounded) multiplicity.
|
static Multiplicity |
STAR
the constant representing the (0,unbounded) multiplicity.
|
static Multiplicity |
ZERO
the constant representing the (0,0) multiplicity.
|
Modifier and Type | Method and Description |
---|---|
static Multiplicity |
choice(Multiplicity lhs,
Multiplicity rhs) |
static Multiplicity |
create(BigInteger min,
BigInteger max) |
static Multiplicity |
create(int min,
Integer max) |
boolean |
equals(Object o) |
String |
getMaxString()
Returns the string representation of the 'max' property.
|
static Multiplicity |
group(Multiplicity lhs,
Multiplicity rhs) |
int |
hashCode() |
boolean |
includes(Multiplicity rhs)
Returns true if the multiplicity represented by this object
completely includes the multiplicity represented by the
other object.
|
boolean |
isAtMostOnce()
returns true if the multiplicity is (0,1) or (1,1).
|
boolean |
isOptional()
returns true if the multiplicity is (0,1)
|
boolean |
isUnique()
returns true if the multiplicity is (1,1).
|
boolean |
isZero()
returns true if the multiplicity is (0,0).
|
Multiplicity |
makeOptional() |
Multiplicity |
makeRepeated() |
static Multiplicity |
multiply(Multiplicity lhs,
Multiplicity rhs) |
static Multiplicity |
oneOrMore(Multiplicity c) |
String |
toString()
gets the string representation.
|
public final BigInteger min
public final BigInteger max
public static final Multiplicity ZERO
public static final Multiplicity ONE
public static final Multiplicity OPTIONAL
public static final Multiplicity STAR
public static final Multiplicity PLUS
public static Multiplicity create(BigInteger min, BigInteger max)
public static Multiplicity create(int min, Integer max)
public boolean isUnique()
public boolean isOptional()
public boolean isAtMostOnce()
public boolean isZero()
public boolean includes(Multiplicity rhs)
public String getMaxString()
public String toString()
public static Multiplicity choice(Multiplicity lhs, Multiplicity rhs)
public static Multiplicity group(Multiplicity lhs, Multiplicity rhs)
public static Multiplicity multiply(Multiplicity lhs, Multiplicity rhs)
public static Multiplicity oneOrMore(Multiplicity c)
public Multiplicity makeOptional()
public Multiplicity makeRepeated()
Copyright © 2021 JBoss by Red Hat. All rights reserved.