org.jclarion.clarion
Class ClarionAny

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

public class ClarionAny
extends ClarionObject
implements ClarionMemoryChangeListener


Nested Class Summary
static class ClarionAny.State
           
 
Constructor Summary
  ClarionAny()
           
  ClarionAny(ClarionAny base, java.lang.Thread lock)
           
  ClarionAny(ClarionObject value)
           
protected ClarionAny(ClarionObject value, ClarionObject reference)
           
 
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 is)
          Assuming that serialization is serialization of address only
 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
 ClarionObject getReference()
           
 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 getValue()
           
 void initThread()
           
 int intValue()
          Return integer representation of the object
 boolean isConstrained()
           
 ClarionAny like()
           
 ClarionObject modulus(ClarionObject object)
          Do a numeric modulus.
 ClarionObject multiply(ClarionObject object)
          Do a numeric multiply.
 ClarionObject negate()
          Do a numeric negation.
 void objectChanged(ClarionMemoryModel model)
           
 ClarionObject power(ClarionObject object)
          Do a numeric power.
 void serialize(java.io.OutputStream os)
          Write java object to memory as clarion would represent object in memory
 void setReferenceValue(ClarionObject object)
           
 ClarionAny setThread()
           
 void setValue(ClarionObject object)
          Set object to given value
 void setValue(ClarionObject object, boolean clone)
           
 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, 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, isAnyoneInterestedInChange, isThreaded, lock, notifyChange, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClarionAny

public ClarionAny()

ClarionAny

public ClarionAny(ClarionObject value)

ClarionAny

public ClarionAny(ClarionAny base,
                  java.lang.Thread lock)

ClarionAny

protected ClarionAny(ClarionObject value,
                     ClarionObject reference)
Method Detail

initThread

public void initThread()
Specified by:
initThread in interface Threaded
Overrides:
initThread in class ClarionMemoryModel

getLockedObject

public java.lang.Object getLockedObject(java.lang.Thread t)
Specified by:
getLockedObject in interface Threaded

like

public ClarionAny like()

toString

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

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:

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

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:

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:

genericLike

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

getBool

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

Specified by:
getBool in class ClarionObject
Returns:

getDecimal

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

Specified by:
getDecimal 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:

intValue

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

Specified by:
intValue 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:

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:

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:

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:

setValue

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

Specified by:
setValue in class ClarionObject

setReferenceValue

public void setReferenceValue(ClarionObject object)

setValue

public void setValue(ClarionObject object,
                     boolean clone)

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:

deserialize

public void deserialize(java.io.InputStream is)
                 throws java.io.IOException
Assuming that serialization is serialization of address only

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

serialize

public void serialize(java.io.OutputStream os)
               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

objectChanged

public void objectChanged(ClarionMemoryModel model)
Specified by:
objectChanged in interface ClarionMemoryChangeListener

getValue

public ClarionObject getValue()
Overrides:
getValue in class ClarionObject

getReference

public ClarionObject getReference()

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:

setThread

public ClarionAny setThread()


Copyright © 2010. All Rights Reserved.