org.jclarion.clarion
Class ClarionBool

java.lang.Object
  extended by org.jclarion.clarion.ClarionMemoryModel
      extended by org.jclarion.clarion.ClarionObject
          extended by org.jclarion.clarion.ClarionBool
All Implemented Interfaces:
Threaded

public class ClarionBool
extends ClarionObject


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jclarion.clarion.ClarionMemoryModel
ClarionMemoryModel.State
 
Constructor Summary
ClarionBool()
          Create new clarion boolean.
ClarionBool(boolean value)
          Create new boolean
ClarionBool(int value)
          Create new boolean
 
Method Summary
 ClarionObject add(ClarionObject object)
          Do a numeric add.
 boolean boolValue()
          Return boolen representation of the object
 void clear(int method)
          Clear object value.
 int compareTo(ClarionObject object)
          Do a Comparison.
 void deserialize(java.io.InputStream os)
          Read object from memory as clarion would represent object in memory
 ClarionObject divide(ClarionObject object)
          Do a numeric divide.
 ClarionObject genericLike()
           
 ClarionBool getBool()
          Convert to bool object
 ClarionDecimal getDecimal()
          Convert to decimal object
 java.lang.Object getLockedObject(java.lang.Thread t)
           
 ClarionNumber getNumber()
          Convert to number object
 ClarionReal getReal()
          Convert to real object
 int getSize()
          Return max size of the object when represented as a string Used mainly by ASCII file driver
 ClarionString getString()
          Convert to string object
 ClarionObject getThreadLockedClone()
           
 int intValue()
          Return integer representation of the object
 boolean isConstrained()
           
 ClarionBool like()
          clone object
 ClarionObject modulus(ClarionObject object)
          Do a numeric modulus.
 ClarionObject multiply(ClarionObject object)
          Do a numeric multiply.
 ClarionObject negate()
          Do a numeric negation.
 ClarionObject power(ClarionObject object)
          Do a numeric power.
 void serialize(java.io.OutputStream is)
          Write java object to memory as clarion would represent object in memory
 void setValue(ClarionObject object)
          Set object to given value
 ClarionObject subtract(ClarionObject object)
          Do a numeric subtract.
 java.lang.String toString()
           
 
Methods inherited from class org.jclarion.clarion.ClarionObject
add, clear, clearNull, compareTo, concat, concatSegment, decrement, decrement, divide, doSetName, doSetOver, doSetOver, equals, gcd, getName, getOwner, getValue, increment, increment, isDecimal, modulus, multiply, power, setNull, setOver, setOwner, setValue, stringAt, stringAt, stringAt, stringAt, subtract
 
Methods inherited from class org.jclarion.clarion.ClarionMemoryModel
addChangeListener, addChangeListener, castTo, getListenerCount, initThread, isAnyoneInterestedInChange, isThreaded, lock, notifyChange, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClarionBool

public ClarionBool()
Create new clarion boolean. Defaults to false


ClarionBool

public ClarionBool(int value)
Create new boolean

Parameters:
value. - 0 = false !0 = true

ClarionBool

public ClarionBool(boolean value)
Create new boolean

Parameters:
value. - 0 = false !0 = true
Method Detail

getThreadLockedClone

public ClarionObject getThreadLockedClone()

getLockedObject

public java.lang.Object getLockedObject(java.lang.Thread t)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

like

public ClarionBool like()
clone object

Returns:

add

public ClarionObject add(ClarionObject object)
Description copied from class: ClarionObject
Do a numeric add. Result is returned as a new object

Specified by:
add in class ClarionObject
Returns:

compareTo

public int compareTo(ClarionObject object)
Description copied from class: ClarionObject
Do a Comparison. Comparison type is preferentially numeric but if either object is a non numeric string then comparsion is a lexical comparison

Specified by:
compareTo in class ClarionObject
Returns:

intValue

public int intValue()
Description copied from class: ClarionObject
Return integer representation of the object

Specified by:
intValue in class ClarionObject
Returns:

multiply

public ClarionObject multiply(ClarionObject object)
Description copied from class: ClarionObject
Do a numeric multiply. Result is returned as a new object

Specified by:
multiply in class ClarionObject
Returns:

setValue

public void setValue(ClarionObject object)
Description copied from class: ClarionObject
Set object to given value

Specified by:
setValue in class ClarionObject

getBool

public ClarionBool getBool()
Description copied from class: ClarionObject
Convert to bool object

Specified by:
getBool in class ClarionObject
Returns:

getNumber

public ClarionNumber getNumber()
Description copied from class: ClarionObject
Convert to number object

Specified by:
getNumber in class ClarionObject
Returns:

getReal

public ClarionReal getReal()
Description copied from class: ClarionObject
Convert to real object

Specified by:
getReal in class ClarionObject
Returns:

getString

public ClarionString getString()
Description copied from class: ClarionObject
Convert to string object

Specified by:
getString in class ClarionObject
Returns:

divide

public ClarionObject divide(ClarionObject object)
Description copied from class: ClarionObject
Do a numeric divide. Result is returned as a new object

Specified by:
divide in class ClarionObject
Returns:

modulus

public ClarionObject modulus(ClarionObject object)
Description copied from class: ClarionObject
Do a numeric modulus. Result is returned as a new object

Specified by:
modulus in class ClarionObject
Returns:

power

public ClarionObject power(ClarionObject object)
Description copied from class: ClarionObject
Do a numeric power. Result is returned as a new object

Specified by:
power in class ClarionObject
Returns:

subtract

public ClarionObject subtract(ClarionObject object)
Description copied from class: ClarionObject
Do a numeric subtract. Result is returned as a new object

Specified by:
subtract in class ClarionObject
Returns:

boolValue

public boolean boolValue()
Description copied from class: ClarionObject
Return boolen representation of the object

Specified by:
boolValue in class ClarionObject
Returns:

clear

public void clear(int method)
Description copied from class: ClarionObject
Clear object value.

Specified by:
clear in class ClarionObject

negate

public ClarionObject negate()
Description copied from class: ClarionObject
Do a numeric negation. Result is returned as a new object

Specified by:
negate in class ClarionObject
Returns:

getDecimal

public ClarionDecimal getDecimal()
Description copied from class: ClarionObject
Convert to decimal object

Specified by:
getDecimal in class ClarionObject
Returns:

deserialize

public void deserialize(java.io.InputStream os)
                 throws java.io.IOException
Description copied from class: ClarionMemoryModel
Read object from memory as clarion would represent object in memory

Specified by:
deserialize in class ClarionMemoryModel
Throws:
java.io.IOException

serialize

public void serialize(java.io.OutputStream is)
               throws java.io.IOException
Description copied from class: ClarionMemoryModel
Write java object to memory as clarion would represent object in memory

Specified by:
serialize in class ClarionMemoryModel
Throws:
java.io.IOException

genericLike

public ClarionObject genericLike()
Specified by:
genericLike in class ClarionObject

isConstrained

public boolean isConstrained()
Specified by:
isConstrained in class ClarionObject

getSize

public int getSize()
Description copied from class: ClarionObject
Return max size of the object when represented as a string Used mainly by ASCII file driver

Specified by:
getSize in class ClarionObject
Returns:


Copyright © 2010. All Rights Reserved.