|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCrystalValue
com.crystaldecisions.reports.common.value.FormulaValue
com.crystaldecisions.reports.common.value.NumericValue
com.crystaldecisions.reports.common.value.NumberValue
public final class NumberValue
Provides methods for converting native Java types to a format understood by the Crystal Reports
Formula Language. All Java user defined functions must return a FormulaValue
object.
Field Summary | |
---|---|
static NumberValue |
one
A NumberValue with a value of 1. |
static NumberValue |
ten
A NumberValue with a value of 10. |
static NumberValue |
two
A NumberValue with a value of 2. |
static NumberValue |
zero
A NumberValue with a value of 0. |
Fields inherited from class com.crystaldecisions.reports.common.value.NumericValue |
---|
nExactDecimalPlaces, scalingFactor |
Method Summary | |
---|---|
FormulaValue |
coerceToBoolean()
Internal use only. |
FormulaValue |
coerceToCurrency()
Internal use only. |
FormulaValue |
coerceToNumber()
Internal use only. |
static NumberValue |
fromCurrencyValue(CurrencyValue currencyValue)
Returns a NumberValue object that represents the given
CurrencyValue object. |
static NumberValue |
fromDouble(double value)
Returns a NumberValue object that represents the given double
value. |
static NumberValue |
fromLong(long value)
Returns a NumberValue object that represents the given long
value. |
static NumberValue |
fromScaledDouble(double scaledDouble)
Returns a NumberValue object that represents the value of
scaledDouble / scalingFactor . |
static NumberValue |
fromScaledLong(long scaledLong)
Returns a NumberValue object that represents the value of
scaledLong / scalingFactor . |
int |
getEncodedSize(ValueType type)
|
int |
getEncodedSizeForArchive(ValueType type)
|
static int |
GetMaxEncodedSize(ValueType type)
|
ValueType |
getValueType()
Gets the ValueType of this NumberValue object. |
static NumberValue |
Load(ValueType type,
ExtendedDataInput in)
|
static NumberValue |
LoadFromArchive(ValueType type,
IInputArchive ar)
|
void |
store(ValueType type,
ExtendedDataOutput out)
|
void |
storeToArchive(ValueType type,
IOutputArchive ar)
|
java.lang.String |
toString()
Returns a String that represents this NumberValue as a
String . |
Methods inherited from class com.crystaldecisions.reports.common.value.NumericValue |
---|
compareTo, compareTo, equals, fromDouble, fromLong, fromNumericValue, fromScaledDouble, fromScaledLong, getAsDouble, getAsInteger, getDouble, getInt, getLong, getNormalizedNumericValue, getScaledDouble, getScaledInt, getScaledLong, hashCode, isIntegerValue |
Methods inherited from class com.crystaldecisions.reports.common.value.FormulaValue |
---|
coerce, coerceToArray, coerceToArray, coerceToBoolean, coerceToCurrency, coerceToDate, coerceToDate, coerceToDateTime, coerceToDateTime, coerceToNumber, coerceToRange, coerceToRange, coerceToRangeArray, coerceToRangeArray, coerceToString, coerceToString, coerceToTime, coerceToTime, getFormulaValueType, makeZeroValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final NumberValue zero
NumberValue
with a value of 0.
public static final NumberValue one
NumberValue
with a value of 1.
public static final NumberValue two
NumberValue
with a value of 2.
public static final NumberValue ten
NumberValue
with a value of 10.
Method Detail |
---|
public void store(ValueType type, ExtendedDataOutput out) throws java.io.IOException
java.io.IOException
public void storeToArchive(ValueType type, IOutputArchive ar) throws ArchiveException
ArchiveException
public static NumberValue Load(ValueType type, ExtendedDataInput in) throws java.io.IOException
java.io.IOException
public static NumberValue LoadFromArchive(ValueType type, IInputArchive ar) throws ArchiveException
ArchiveException
public static int GetMaxEncodedSize(ValueType type)
public int getEncodedSizeForArchive(ValueType type)
public int getEncodedSize(ValueType type)
public static NumberValue fromScaledDouble(double scaledDouble)
NumberValue
object that represents the value of
scaledDouble / scalingFactor
.
scaledDouble
- a double
with a value equal to actualValue * scalingFactor
NumberValue
object that represents the value of
scaledDouble / scalingFactor
public static NumberValue fromScaledLong(long scaledLong)
NumberValue
object that represents the value of
scaledLong / scalingFactor
.
scaledLong
- a long
with a value equal to actualValue * scalingFactor
NumberValue
object that represents the value of
scaledLong / scalingFactor
public static NumberValue fromDouble(double value)
NumberValue
object that represents the given double
value.
value
- the double
value to be represented
NumberValue
object that represents the given double
valuepublic static NumberValue fromLong(long value)
NumberValue
object that represents the given long
value.
value
- the long
value to be represented
NumberValue
object that represents the given long
valuepublic static NumberValue fromCurrencyValue(CurrencyValue currencyValue)
NumberValue
object that represents the given
CurrencyValue
object.
currencyValue
- the CurrencyValue
object to be represented
NumberValue
object that represents the given
CurrencyValue
objectpublic FormulaValue coerceToNumber()
coerceToNumber
in class FormulaValue
public FormulaValue coerceToCurrency()
coerceToCurrency
in class FormulaValue
public FormulaValue coerceToBoolean()
coerceToBoolean
in class FormulaValue
public ValueType getValueType()
ValueType
of this NumberValue
object.
public java.lang.String toString()
String
that represents this NumberValue
as a
String
. The String
is of the form: "c(42.37)".
toString
in class NumericValue
String
that represents this NumberValue
as a
String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |