org.openfast
Class DecimalValue

java.lang.Object
  extended by org.openfast.ScalarValue
      extended by org.openfast.NumericValue
          extended by org.openfast.DecimalValue
All Implemented Interfaces:
java.io.Serializable, FieldValue

public class DecimalValue
extends NumericValue

See Also:
Serialized Form

Field Summary
 int exponent
           
 long mantissa
           
 
Fields inherited from class org.openfast.ScalarValue
NULL, UNDEFINED
 
Constructor Summary
DecimalValue(java.math.BigDecimal bigDecimal)
           
DecimalValue(double value)
           
DecimalValue(long mantissa, int exponent)
           
 
Method Summary
 NumericValue add(NumericValue addend)
           
 NumericValue decrement()
           
 boolean equals(DecimalValue other)
           
 boolean equals(int value)
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 NumericValue increment()
           
 boolean isNull()
           
 java.lang.String serialize()
           
 NumericValue subtract(NumericValue subtrahend)
           
 java.math.BigDecimal toBigDecimal()
           
 byte toByte()
           
 double toDouble()
          The double value should be rounded using a given precision by users of this method.
 int toInt()
           
 long toLong()
           
 short toShort()
           
 java.lang.String toString()
           
 
Methods inherited from class org.openfast.ScalarValue
copy, equalsValue, getBytes, isUndefined
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

exponent

public final int exponent

mantissa

public final long mantissa
Constructor Detail

DecimalValue

public DecimalValue(double value)

DecimalValue

public DecimalValue(long mantissa,
                    int exponent)

DecimalValue

public DecimalValue(java.math.BigDecimal bigDecimal)
Method Detail

increment

public NumericValue increment()
Specified by:
increment in class NumericValue

decrement

public NumericValue decrement()
Specified by:
decrement in class NumericValue

isNull

public boolean isNull()
Overrides:
isNull in class ScalarValue
Returns:
Returns false

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(DecimalValue other)

subtract

public NumericValue subtract(NumericValue subtrahend)
Specified by:
subtract in class NumericValue

add

public NumericValue add(NumericValue addend)
Specified by:
add in class NumericValue

serialize

public java.lang.String serialize()

equals

public boolean equals(int value)
Specified by:
equals in class NumericValue

toLong

public long toLong()
Specified by:
toLong in class NumericValue

toInt

public int toInt()
Specified by:
toInt in class NumericValue

toShort

public short toShort()
Overrides:
toShort in class ScalarValue

toByte

public byte toByte()
Overrides:
toByte in class ScalarValue

toDouble

public double toDouble()
The double value should be rounded using a given precision by users of this method.

Overrides:
toDouble in class ScalarValue

toBigDecimal

public java.math.BigDecimal toBigDecimal()
Overrides:
toBigDecimal in class ScalarValue

toString

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.