IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.core
Interface IMultiplicity

All Known Implementing Classes:
PatternMultiplicity

public interface IMultiplicity

Represents the range of the allowable cardinality values that a set can assume.

This interface can represent the multiplicity of a pattern parameter, for example. Use the getLowerBound and getUpperBound methods to retrieve the range of the allowed cardinalities values for the set. To check if the multiplicity is unlimited, use the isUnlimited method.


Method Summary
 int getLowerBound()
          Returns the lower bound specified by this multiplicity.
 int getUpperBound()
          Returns the upper bound specified by this multiplicity.
 boolean isOptional()
          Indicates if the lower bound is zero or not.
 boolean isUnlimited()
          Indicates whether this multiplicity is unlimited.
 String toString()
          Returns a String image of this multiplicity.
 

Method Detail

getLowerBound

public int getLowerBound()
Returns the lower bound specified by this multiplicity.

Returns:
Returns the lower bound of the multiplicity.

getUpperBound

public int getUpperBound()
Returns the upper bound specified by this multiplicity.

Returns:
Returns the upper bound of the multiplicity.

isOptional

public boolean isOptional()
Indicates if the lower bound is zero or not.

Returns:
Returns true if the lower bond is zero; otherwise, it returns a value of false.

isUnlimited

public boolean isUnlimited()
Indicates whether this multiplicity is unlimited.

Unlimited multiplicity means that the upper bound is unbounded or internally set to -1 (the same as many).

Returns:
Returns true if the upper bound is unlimited; otherwise, it returns false.

toString

public String toString()
Returns a String image of this multiplicity.

Returns:
Returns the string image of the multiplicity.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.