de.tuberlin.cs.cis.ocl.type.reflect
Interface OclReal

All Superinterfaces:
OclAny
All Known Subinterfaces:
OclInteger
All Known Implementing Classes:
IntegerInstance, RealInstance

public interface OclReal
extends OclAny

Represents and identifies the OCL 1.5 type Real. It is used by the context checker to reflect operations of and to identify the type within the OCL-context. The names of the operations had to be adapted to java conform method names (therefore they must be remapped to the ocl names to be compareable). Each instance of this interface is handled as an OCL instance of the type Real during the evaluation process. Its methods are used to describe the predefined properties of the type. For a complete description of the type and its properties (to be specific for this class and its methods) refer to the type description of OCL 1.5.

Author:
fchabar
See Also:
OCL 1.5 Standard, de.tuberlin.cs.cis.ocl.type, de.tuberlin.cs.cis.ocl.eval.instance

Method Summary
 OclReal abs()
          Results in the absolute value of this instance.
 OclReal division(OclReal r2)
          Represents the operation '/'.
 OclInteger floor()
          Results in the largest integer which is less than or equal to r.
 OclBoolean less(OclReal r2)
          Returns True if this instance is less than r2.
 OclBoolean lessOrEqual(OclReal r2)
          Returns True if this instance is less than or equal than r2.
 OclReal max(OclReal r2)
          Results in the maximum of this instance and r2.
 OclReal min(OclReal r2)
          Results in the minimum of this instance and r2.
 OclReal minus(OclReal r2)
          Represents the operation '-'.
 OclBoolean more(OclReal r2)
          Returns True if this instance is greater than r2.
 OclBoolean moreOrEqual(OclReal r2)
          Returns True if this instance is greater or equal than r2.
 OclReal multiplication(OclReal r2)
          Represents the operation '*'.
 OclReal negation()
          Represents the prefix operation '-'.
 OclReal plus(OclReal r2)
          Represents the operation '+'.
 OclInteger round()
          Results in the integer that is closest to r.
 
Methods inherited from interface de.tuberlin.cs.cis.ocl.type.reflect.OclAny
eq, neq, oclAsType, oclInState, oclIsKindOf, oclIsNew, oclIsTypeOf
 

Method Detail

plus

public OclReal plus(OclReal r2)
Represents the operation '+'. Results in the value of the addition of this instance and r2.

Parameters:
r2 - an instance of Real (!= null).
Returns:
The value of the addition of this instance and r2.

minus

public OclReal minus(OclReal r2)
Represents the operation '-'. Results in the value of the substraction of this instance and r2.

Parameters:
r2 - an instance of Real (!= null).
Returns:
The value of the substraction of this instance and r2.

multiplication

public OclReal multiplication(OclReal r2)
Represents the operation '*'. Results in the value of the multiplication of this instance and r2.

Parameters:
r2 - an instance of Real (!= null).
Returns:
The value of the multiplication of this instance and r2.

negation

public OclReal negation()
Represents the prefix operation '-'. Results in the negative value of self.

Returns:
The negative value of self.

division

public OclReal division(OclReal r2)
Represents the operation '/'. Results in the value of this instance divided by r2.

Parameters:
r2 - an instance of Real (!= null).
Returns:
The value of the division of this instance by r2.
Throws:
UndefinedValueException - can be thrown if r2 is zero.

abs

public OclReal abs()
Results in the absolute value of this instance.

Returns:
the absolute value of this instance.

floor

public OclInteger floor()
Results in the largest integer which is less than or equal to r.

Returns:
the largest integer which is less than or equal to r.

round

public OclInteger round()
Results in the integer that is closest to r. When there are two such integers, the largest one.

Returns:
the integer that is closest to r

max

public OclReal max(OclReal r2)
Results in the maximum of this instance and r2.

Parameters:
r2 - an instance of Real (!= null)
Returns:
the maximum of this instance and r2.

min

public OclReal min(OclReal r2)
Results in the minimum of this instance and r2.

Parameters:
r2 - an instance of Real (!= null)
Returns:
the minimum of this instance and r2.

less

public OclBoolean less(OclReal r2)
Returns True if this instance is less than r2.

Parameters:
r2 - an instance of Real (!= null)
Returns:
True if this instance is less than r2, False otherwise.

more

public OclBoolean more(OclReal r2)
Returns True if this instance is greater than r2.

Parameters:
r2 - an instance of Real (!= null)
Returns:
True if this instance is greater than r2, False otherwise.

lessOrEqual

public OclBoolean lessOrEqual(OclReal r2)
Returns True if this instance is less than or equal than r2.

Parameters:
r2 - an instance of Real (!= null)
Returns:
True if this instance is less than or equal than r2, False otherwise.

moreOrEqual

public OclBoolean moreOrEqual(OclReal r2)
Returns True if this instance is greater or equal than r2.

Parameters:
r2 - an instance of Real (!= null)
Returns:
True if this instance is greater or equal than r2, False otherwise.