de.tuberlin.cs.cis.ocl.eval.instance
Class BooleanInstance

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.eval.instance.PredefinedInstance
        |
        +--de.tuberlin.cs.cis.ocl.eval.instance.OclAnyInstance
              |
              +--de.tuberlin.cs.cis.ocl.eval.instance.BooleanInstance
All Implemented Interfaces:
Instance, OclAny, OclBoolean

public class BooleanInstance
extends OclAnyInstance
implements OclBoolean

Represents an instance of the OCL type Boolean.

Author:
fchabar

Field Summary
static BooleanInstance FALSE
          Constant describing the boolean OCL value false
static BooleanInstance TRUE
          Constant describing the boolean OCL value true
 
Constructor Summary
BooleanInstance(boolean value)
          Constructs an instance of the OCL type Boolean via a Java boolean.
BooleanInstance(java.lang.Boolean value)
          Constructs an instance of the OCL type Boolean via a Java Boolean.
 
Method Summary
 OclBoolean and(OclBoolean b2)
          Results in True if either this instance and b2 is true.
static boolean booleanValue(OclBoolean b2)
          Determines the Java boolean representation of an OclBoolean value.
 boolean equals(java.lang.Object o)
           
 OclBoolean implies(OclBoolean b2)
          Results in True if this instance is false, or if b is true and b2 is true.
 OclBoolean not()
          Results in True if this instance is false.
 OclBoolean or(OclBoolean b2)
          Results in True if either this instance or b2 is true.
 OclBoolean xor(OclBoolean b2)
          Results in True if either this instance or b2 is true, but not both.
 
Methods inherited from class de.tuberlin.cs.cis.ocl.eval.instance.OclAnyInstance
eq, neq, oclAsType, oclInState, oclIsKindOf, oclIsNew, oclIsTypeOf
 
Methods inherited from class de.tuberlin.cs.cis.ocl.eval.instance.PredefinedInstance
getRepresentation, getRuntimeType, getValue, hashCode, invoke, navigate, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.tuberlin.cs.cis.ocl.type.reflect.OclAny
eq, neq, oclAsType, oclInState, oclIsKindOf, oclIsNew, oclIsTypeOf
 

Field Detail

TRUE

public static final BooleanInstance TRUE
Constant describing the boolean OCL value true


FALSE

public static final BooleanInstance FALSE
Constant describing the boolean OCL value false

Constructor Detail

BooleanInstance

public BooleanInstance(java.lang.Boolean value)
Constructs an instance of the OCL type Boolean via a Java Boolean.

Parameters:
value - a Java Boolean.

BooleanInstance

public BooleanInstance(boolean value)
Constructs an instance of the OCL type Boolean via a Java boolean.

Parameters:
value - a Java boolean.
Method Detail

booleanValue

public static boolean booleanValue(OclBoolean b2)
Determines the Java boolean representation of an OclBoolean value.

Parameters:
b2 - an OclBoolean value
Returns:
the Java boolean representation of the specified OCL Boolean value.

and

public OclBoolean and(OclBoolean b2)
Description copied from interface: OclBoolean
Results in True if either this instance and b2 is true.

Specified by:
and in interface OclBoolean
Parameters:
b2 - an instance of Boolean (!= null)
Returns:
True if either this instance and b2 is true, False otherwise.

implies

public OclBoolean implies(OclBoolean b2)
Description copied from interface: OclBoolean
Results in True if this instance is false, or if b is true and b2 is true.

Specified by:
implies in interface OclBoolean
Parameters:
b2 - b2 an instance of Boolean (!= null)
Returns:
True if this instance is false, or if b is true and b2 is true.

not

public OclBoolean not()
Description copied from interface: OclBoolean
Results in True if this instance is false.

Specified by:
not in interface OclBoolean
Returns:
True if this instance is false.

or

public OclBoolean or(OclBoolean b2)
Description copied from interface: OclBoolean
Results in True if either this instance or b2 is true.

Specified by:
or in interface OclBoolean
Parameters:
b2 - an instance of Boolean (!= null)
Returns:
True if either this instance or b2 is true, False otherwise.

xor

public OclBoolean xor(OclBoolean b2)
Description copied from interface: OclBoolean
Results in True if either this instance or b2 is true, but not both.

Specified by:
xor in interface OclBoolean
Parameters:
b2 - an instance of Boolean (!= null)
Returns:
True if either this instance or b2 is true, but not both, False otherwise.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class OclAnyInstance