public final class Multiplicity
extends java.lang.Object
For example, (0,unbounded) corresponds to the '*' occurence of DTD. (0,1) corresponds to the '?' occurence of DTD.
| Modifier and Type | Field | Description |
|---|---|---|
java.math.BigInteger |
max |
|
java.math.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 | Description |
|---|---|---|
static Multiplicity |
choice(Multiplicity lhs,
Multiplicity rhs) |
|
static Multiplicity |
create(int min,
java.lang.Integer max) |
|
static Multiplicity |
create(java.math.BigInteger min,
java.math.BigInteger max) |
|
boolean |
equals(java.lang.Object o) |
|
java.lang.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) |
|
java.lang.String |
toString() |
gets the string representation.
|
public final java.math.BigInteger min
public final java.math.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(java.math.BigInteger min, java.math.BigInteger max)
public static Multiplicity create(int min, java.lang.Integer max)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isUnique()
public boolean isOptional()
public boolean isAtMostOnce()
public boolean isZero()
public boolean includes(Multiplicity rhs)
public java.lang.String getMaxString()
public java.lang.String toString()
toString in class java.lang.Objectpublic 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 © 2018 Oracle Corporation. All rights reserved.