Dresden OCL Toolkit

tudresden.ocl.check.types.testfacade
Class Multiplicity

java.lang.Object
  extended bytudresden.ocl.check.types.testfacade.Multiplicity

class Multiplicity
extends Object


Field Summary
static int INFINITE
          constant to be used as return value for the method getMax()
protected  int max
           
protected  int min
           
static Multiplicity ONE_TO_INF
          multiplicity "1 ..
static Multiplicity STANDARD
          multiplicity "1"
static Multiplicity ZERO_OR_ONE
          multiplicity "0 ..
static Multiplicity ZERO_TO_INF
          multiplicity "0 ..
 
Constructor Summary
Multiplicity(int min, int max)
          create a new Multiplicity objects representing the given minumum and maximum multiplicity of an association end
 
Method Summary
 int getMax()
           
 int getMin()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFINITE

public static int INFINITE
constant to be used as return value for the method getMax()

See Also:
getMax()

STANDARD

public static Multiplicity STANDARD
multiplicity "1"


ZERO_TO_INF

public static Multiplicity ZERO_TO_INF
multiplicity "0 .. *"


ONE_TO_INF

public static Multiplicity ONE_TO_INF
multiplicity "1 .. *"


ZERO_OR_ONE

public static Multiplicity ZERO_OR_ONE
multiplicity "0 .. 1"


min

protected int min

max

protected int max
Constructor Detail

Multiplicity

public Multiplicity(int min,
                    int max)
create a new Multiplicity objects representing the given minumum and maximum multiplicity of an association end

Parameters:
max - the maximum multiplicity, possibly INFINITE
Throws:
IllegalArgumentException - if not 0 <= min and max<>0 and (min<=max or max=INFINITE)
See Also:
INFINITE
Method Detail

getMax

public int getMax()
Returns:
the maximum multiplicity of the association end, possibly INFINITE
See Also:
INFINITE

getMin

public int getMin()
Returns:
the minumum multiplicity of the association end, usually 0 or 1

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.