All Packages Class Hierarchy This Package Previous Next Index
Class simula.random.BooleanValue
java.lang.Object
|
+----simula.random.Value
|
+----simula.random.BooleanValue
- public class BooleanValue
- extends Value
Implementation of the class Value that encapsulate boolean values.
- See Also:
- Value
-
asBoolean()
- Returns the encapsulated boolean.
-
asInteger()
- Returns the encapsulated boolean represented as an integer value.
-
asReal()
- Returns the encapsulated boolean represented as a real value.
asBoolean
public boolean asBoolean() throws TypeDrawnException
- Returns the encapsulated boolean.
- Returns:
- the encapsulated boolean.
- Throws: TypeDrawnException
- Fired whenever meaningless
- Overrides:
- asBoolean in class Value
asInteger
public int asInteger() throws TypeDrawnException
- Returns the encapsulated boolean represented as an integer value.
- Returns:
- 1 if the encapsulated boolean is true; 0 otherwise.
- Throws: TypeDrawnException
- Fired whenever meaningless
- Overrides:
- asInteger in class Value
asReal
public double asReal() throws TypeDrawnException
- Returns the encapsulated boolean represented as a real value.
- Returns:
- 1.0 if the encapsulated boolean is true; 0.0 otherwise.
- Throws: TypeDrawnException
- Fired whenever meaningless
- Overrides:
- asReal in class Value
All Packages Class Hierarchy This Package Previous Next Index