|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.model.Multiplicity
public final class Multiplicity
represents a possible number of occurence. Usually, denoted by a pair of integers like (1,1) or (5,10). A special value "unbounded" is allowed as the upper bound.
For example, (0,unbounded) corresponds to the '*' occurence of DTD. (0,1) corresponds to the '?' occurence of DTD.
Field Summary | |
---|---|
java.lang.Integer |
max
|
int |
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. |
Method Summary | |
---|---|
static Multiplicity |
choice(Multiplicity lhs,
Multiplicity rhs)
|
static Multiplicity |
create(int min,
java.lang.Integer 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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int min
public final java.lang.Integer 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
Method Detail |
---|
public static Multiplicity create(int min, java.lang.Integer max)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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.Object
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |