|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.patterns.framework.PatternMultiplicity
Pattern multiplicity is used when indicating multiplicity. This is the framework implementation of the multiplicity class that specializes the pattern service version.
Nested Class Summary | |
static class |
PatternMultiplicity.BoundQualifier
A type-safe enumeration to be used by the outer class' methods. |
Field Summary | |
static PatternMultiplicity |
MANY
|
static PatternMultiplicity |
ONE
|
static PatternMultiplicity |
ONE_TO_MANY
|
static PatternMultiplicity |
ZERO_TO_MANY
|
static PatternMultiplicity |
ZERO_TO_ONE
|
Constructor Summary | |
PatternMultiplicity(int upperBound)
Constructs a new pattern multiplicity element given only an upper bound, the lower bound is assumed to be one if unspecified. |
|
PatternMultiplicity(int lowerBound,
int upperBound)
Constructs a new pattern multiplicity element given a lower and upper bound. |
|
PatternMultiplicity(String identifier)
Constructs a new pattern multiplicity element given a string that will be parsed to set the pattern multiplicity's internal state. |
Method Summary | |
boolean |
equals(Object object)
|
int |
getLowerBound()
Returns the lower bound specified by this multiplicity object. |
int |
getUpperBound()
Returns the upper bound specified by this multiplicity object. |
int |
hashCode()
|
boolean |
isOptional()
Indicates whether this multiplicity allows optionality, in other words, if the lower bound is zero or not. |
boolean |
isSatisfied(int valueCount)
Determines if the multiplicity is satisfied with the input number of values that are associated with this multiplicity. |
boolean |
isSatisfied(int valueCount,
PatternMultiplicity.BoundQualifier qualifier)
Determines if the multiplicity is satisfied with the input number of values that are associated with this multiplicity. |
boolean |
isUnlimited()
Indicates whether this multiplicity is unlimited, meaning the upper bound is unbounded or internally set to -1 (the same as many). |
String |
toString()
Returns a String image of this multiplicity. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final PatternMultiplicity MANY
public static final PatternMultiplicity ONE
public static final PatternMultiplicity ONE_TO_MANY
public static final PatternMultiplicity ZERO_TO_MANY
public static final PatternMultiplicity ZERO_TO_ONE
Constructor Detail |
public PatternMultiplicity(int upperBound)
upperBound
- public PatternMultiplicity(int lowerBound, int upperBound)
lowerBound
- lower bound on the multiplicityupperBound
- upper bound on the multiplicitypublic PatternMultiplicity(String identifier)
identifier
- textual representation of the multiplicityMethod Detail |
public boolean equals(Object object)
public int hashCode()
public int getLowerBound()
getLowerBound
in interface IMultiplicity
public int getUpperBound()
getUpperBound
in interface IMultiplicity
public boolean isOptional()
isOptional
in interface IMultiplicity
public boolean isUnlimited()
isUnlimited
in interface IMultiplicity
public String toString()
IMultiplicity
String
image of this multiplicity.
toString
in interface IMultiplicity
public boolean isSatisfied(int valueCount)
valueCount
- the number of values checked for multiplicity validity
public boolean isSatisfied(int valueCount, PatternMultiplicity.BoundQualifier qualifier)
UPPER_BOUND_ONLY
is specified, only the
upper boundary will be checked for conformance, if LOWER_BOUND_ONLY
is specified, only the lower boundary will be checked for conformance.
valueCount
- the number of valuesqualifier
- a type-safe enumeration indicating lower or upper boundary only
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.