literals
Class PSBoolean

java.lang.Object
  extended byliterals.PSBoolean
All Implemented Interfaces:
PSLiteral, PSObject

public class PSBoolean
extends java.lang.Object
implements PSLiteral


Constructor Summary
PSBoolean()
          Creates a new PSBoolean object with a default value set to false.
PSBoolean(boolean booleanValue)
          Creates a new PSBoolean object with its value set to the value being given as a parameter.
PSBoolean(java.lang.String booleanStr)
          Creates a new PSBoolean object with its value set to the value being given as a parameter.
 
Method Summary
 boolean getValue()
          Returns the boolean value being encapsulated.
 java.lang.String toString()
          Returns the boolean value being encapsulated in a string form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PSBoolean

public PSBoolean()
Creates a new PSBoolean object with a default value set to false.
Precondition : -
Postcondition : A new PSBoolean will be created with a value set to false.


PSBoolean

public PSBoolean(boolean booleanValue)
Creates a new PSBoolean object with its value set to the value being given as a parameter.
Precondition : -
Postcondition : A new PSBoolean will be created with a value that has been given as a parameter.

Parameters:
booleanValue - The initialization value of the newly created PSNumber.

PSBoolean

public PSBoolean(java.lang.String booleanStr)
Creates a new PSBoolean object with its value set to the value being given as a parameter.
Precondition : Program client must be sure that the string representation of the value is a correct one.
Postcondition : A new PSBoolean will be created with a value that has been given as a parameter.

Parameters:
booleanStr - The initialization value of the newly created PSNumber.
Method Detail

getValue

public boolean getValue()
Returns the boolean value being encapsulated.
Precondition : The instance is in a valid form.
Postcondition : The value of PSBoolean will be returned.

Returns:
The value the instance of a PSBoolean holds.

toString

public java.lang.String toString()
Returns the boolean value being encapsulated in a string form.
Precondition : The instance is in a valid form.
Postcondition : The value of PSBoolean in a string form will be returned.

Specified by:
toString in interface PSLiteral
Returns:
The value that PSBoolean holds in a string form.