com.parabon.common
Class ScalarParameterValue

java.lang.Object
  extended by com.parabon.common.ScalarParameterValue
All Implemented Interfaces:
ParameterValue, com.parabon.util.ObjectPool.Destroyable, com.parabon.util.ObjectPool.Reclaimable, java.io.Externalizable, java.io.Serializable

public class ScalarParameterValue
extends java.lang.Object
implements ParameterValue

See Also:
Serialized Form

Field Summary
protected  boolean destroyed
           
protected  double value
           
 
Constructor Summary
ScalarParameterValue()
           
ScalarParameterValue(double value_)
           
 
Method Summary
static ScalarParameterValue allocate(com.parabon.util.ObjectPool pool, double value)
           
 java.lang.Object clone()
           
 ParameterValue cloneParameterValue(com.parabon.util.ObjectPool primePool)
           Creates a functional copy of the ParameterValue, using the specified ObjectPool for instantiation.
 void destroy()
           
 double get()
           
 java.lang.String getAsString()
           
 byte[] getBinaryValue()
           
 boolean getBooleanValue()
           
 java.util.Date getDateValue()
           
 double getDoubleValue()
           
 float getFloatValue()
           
 int getIntValue()
           
 long getLongValue()
           
 java.lang.String getStringValue()
           
 void readExternal(java.io.ObjectInput in)
           
 void reclaim()
           
 void set(double value_)
           
 void setAsString(java.lang.String s)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.parabon.common.ParameterValue
getBinaryValue, getBooleanValue, getDateValue
 

Field Detail

value

protected double value

destroyed

protected boolean destroyed
Constructor Detail

ScalarParameterValue

public ScalarParameterValue(double value_)

ScalarParameterValue

public ScalarParameterValue()
Method Detail

allocate

public static ScalarParameterValue allocate(com.parabon.util.ObjectPool pool,
                                            double value)

reclaim

public void reclaim()
Specified by:
reclaim in interface com.parabon.util.ObjectPool.Reclaimable

destroy

public void destroy()
Specified by:
destroy in interface com.parabon.util.ObjectPool.Destroyable

get

public double get()

getAsString

public java.lang.String getAsString()

set

public void set(double value_)

setAsString

public void setAsString(java.lang.String s)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

cloneParameterValue

public ParameterValue cloneParameterValue(com.parabon.util.ObjectPool primePool)
Description copied from interface: ParameterValue

Creates a functional copy of the ParameterValue, using the specified ObjectPool for instantiation. A null value for the pool is acceptable.

Specified by:
cloneParameterValue in interface ParameterValue

getIntValue

public int getIntValue()
Specified by:
getIntValue in interface ParameterValue

getLongValue

public long getLongValue()
Specified by:
getLongValue in interface ParameterValue

getDoubleValue

public double getDoubleValue()
Specified by:
getDoubleValue in interface ParameterValue

getFloatValue

public float getFloatValue()
Specified by:
getFloatValue in interface ParameterValue

getStringValue

public java.lang.String getStringValue()
Specified by:
getStringValue in interface ParameterValue

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

getBooleanValue

public boolean getBooleanValue()

getDateValue

public java.util.Date getDateValue()

getBinaryValue

public byte[] getBinaryValue()