| java.lang.Object com.sun.tools.xjc.model.Multiplicity
Multiplicity | final public class Multiplicity (Code) | | 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.
author: Kohsuke KAWAGUCHI |
Field Summary | |
final public static Multiplicity | ONE the constant representing the (1,1) multiplicity. | final public static Multiplicity | OPTIONAL the constant representing the (0,1) multiplicity. | final public static Multiplicity | PLUS the constant representing the (1,unbounded) multiplicity. | final public static Multiplicity | STAR the constant representing the (0,unbounded) multiplicity. | final public static Multiplicity | ZERO the constant representing the (0,0) multiplicity. | final public Integer | max | final public int | min |
ONE | final public static Multiplicity ONE(Code) | | the constant representing the (1,1) multiplicity.
|
OPTIONAL | final public static Multiplicity OPTIONAL(Code) | | the constant representing the (0,1) multiplicity.
|
PLUS | final public static Multiplicity PLUS(Code) | | the constant representing the (1,unbounded) multiplicity.
|
STAR | final public static Multiplicity STAR(Code) | | the constant representing the (0,unbounded) multiplicity.
|
ZERO | final public static Multiplicity ZERO(Code) | | the constant representing the (0,0) multiplicity.
|
getMaxString | public String getMaxString()(Code) | | Returns the string representation of the 'max' property.
Either a number or a token "unbounded".
|
hashCode | public int hashCode()(Code) | | |
includes | public boolean includes(Multiplicity rhs)(Code) | | Returns true if the multiplicity represented by this object
completely includes the multiplicity represented by the
other object. For example, we say [1,3] includes [1,2] but
[2,4] doesn't include [1,3].
|
isAtMostOnce | public boolean isAtMostOnce()(Code) | | returns true if the multiplicity is (0,1) or (1,1).
|
isOptional | public boolean isOptional()(Code) | | returns true if the multiplicity is (0,1)
|
isUnique | public boolean isUnique()(Code) | | returns true if the multiplicity is (1,1).
|
isZero | public boolean isZero()(Code) | | returns true if the multiplicity is (0,0).
|
toString | public String toString()(Code) | | gets the string representation.
mainly debug purpose.
|
|
|