![]() |
Apama API Reference for .NET
10.7.1.3
|
Represents the value of an Apama decimal
field, using Decimal or Double objects.
More...
Public Member Functions | |||
DecimalFieldValue (String value) | |||
Create a new DecimalFieldValue
| |||
DecimalFieldValue (double value) | |||
Create a new DecimalFieldValue
| |||
DecimalFieldValue (float value) | |||
Create a new DecimalFieldValue
| |||
DecimalFieldValue (int value) | |||
Create a new DecimalFieldValue
| |||
DecimalFieldValue (long value) | |||
Create a new DecimalFieldValue
| |||
DecimalFieldValue (Decimal value) | |||
Create a new DecimalFieldValue
| |||
override String | ToString () | ||
Stringify this instance of a DecimalFieldValue, using the Decimal value if it is not null, otherwise using the floating point representation, which could show also be NaN or Infinity.
| |||
Properties | |
double | FloatValue [get] |
The floating point representation of this value. More... | |
bool | IsInfinity [get] |
Indicates if this instance of a DecimalFieldValue represents an infinity value More... | |
bool | IsNaN [get] |
Indicates if this instance of a DecimalFieldValue represents a NaN (Not a Number) value More... | |
String | StringValue [get] |
The string representation. This is the original string value (or the Decimal value converted), depending on how the object was originally constructed. More... | |
Nullable< Decimal > | Value [get] |
The Decimal value. If the value returned is null, please use the FloatValue or or StringValue properties (see remarks). More... | |
Represents the value of an Apama decimal
field, using Decimal or Double objects.
This class allows for a wider range of values to be stored than
the Decimal type allows. If the value is within range allowed by a Decimal, as stated in the remarks section there, using
either constructor allows the value to be stored internally as a Decimal. If it is outside the range, the string constructor should be used. The value will then be internally represented as a Double, which allows infinities and NaNs too.
Apama.Event.Parser.DecimalFieldValue.DecimalFieldValue | ( | String | value | ) |
Create a new DecimalFieldValue
value | from a string representation. |
Using this constructor allows for a wider range of values to be stored than the .Net Decimal type allows. If the value is within range allowed by a Decimal (see remarks section there), the value is stored as a Decimal. If it is outside the range (either too big or too small), it will be stored as a Double. If it is outside the range of a Double then it will be stored as an Infinity (and isInfinity will return true, although the original string value will remain) or zero dependent on it's size. It can also be set to Not a Number through this constructor. If the value cannot be parsed, a FormatException is thrown. If the value passed is null, an ArgumentNullException is thrown.
Apama.Event.Parser.DecimalFieldValue.DecimalFieldValue | ( | double | value | ) |
Create a new DecimalFieldValue
value | from a double value. |
Using this constructor allows a double parameter to be handled properly by calling the DecimalFieldValue(String) constructor. Any exceptions or error handling will be handled by the DecimalFieldValue(String) constructor
Apama.Event.Parser.DecimalFieldValue.DecimalFieldValue | ( | float | value | ) |
Create a new DecimalFieldValue
value | from a float value. |
Using this constructor allows a float parameter to be handled properly by calling the DecimalFieldValue(String) constructor. Any exceptions or error handling will be handled by the DecimalFieldValue(String) constructor
Apama.Event.Parser.DecimalFieldValue.DecimalFieldValue | ( | int | value | ) |
Create a new DecimalFieldValue
value | from a int value. |
Using this constructor allows a int parameter to be handled properly by calling the DecimalFieldValue(String) constructor. Any exceptions or error handling will be handled by the DecimalFieldValue(String) constructor
Apama.Event.Parser.DecimalFieldValue.DecimalFieldValue | ( | long | value | ) |
Create a new DecimalFieldValue
value | from a long value. |
Using this constructor allows a long parameter to be handled properly by calling the DecimalFieldValue(String) constructor. Any exceptions or error handling will be handled by the DecimalFieldValue(String) constructor
Apama.Event.Parser.DecimalFieldValue.DecimalFieldValue | ( | Decimal | value | ) |
Create a new DecimalFieldValue
value | from a Decimal value |
Use this constructor if the value falls within the range allowed by a Decimal (see remarks section there), the value is stored as a Decimal. This constructor cannot be used to set Infinities or NaN values.
override String Apama.Event.Parser.DecimalFieldValue.ToString | ( | ) |
Stringify this instance of a DecimalFieldValue, using the Decimal value if it is not null, otherwise using the floating point representation, which could show also be NaN or Infinity.
|
get |
The floating point representation of this value.
Under normal circumstances, this is intended to be as accurate a representation of the decimal value as possible. If the decimal representation from Value returned null (i.e. was outside the range storable), then this function should be used. It can also represent NaN and Infinities. One special case is where the value is extremely close to zero. If this property is 0, and the Value property is null, please use StringValue to see the original number.
|
get |
Indicates if this instance of a DecimalFieldValue represents an infinity value
|
get |
Indicates if this instance of a DecimalFieldValue represents a NaN (Not a Number) value
|
get |
The string representation. This is the original string value (or the Decimal value converted), depending on how the object was originally constructed.
|
get |
The Decimal value. If the value returned is null, please use the FloatValue or or StringValue properties (see remarks).
When a null value is returned, the value is either outside the range allowable by the Decimal type. It could also be a NaN, or Positive/Negative Infinity value. Whilst typically the value might be too large in magnitude to be represented as a decimal, one special case is where the value is extremely close to zero. If this proeprty is null, and FloatValue is 0, please use StringValue to see the original number.