com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal Class Reference

Collaboration diagram for com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal:

Public Member Functions
SpecialBigDecimal (BigDecimal val)
Public Attributes
final BigDecimal bigDecimal
final boolean isSpecial
final Double special
Static Public Attributes
static final SpecialBigDecimal NAN
static final SpecialBigDecimal NEGATIVE_INFINITY
static final SpecialBigDecimal POSITIVE_INFINITY

Detailed Description

Wraps a BigDecimal value such that NaN, +Infinity, and -Infinity can also be represented. This class does not have comparison or equality functionality. It's intended usage is only as a vehicle for the results of parseNumber.

When handling the result of StandardTypeCoercion#parseNumber(char[]), first check whether or not the result SpecialBigDecimal#isSpecial. If the result is special, then the value is either NaN, Infinity, or -Infinity. The value can be found in SpecialBigDecimal#special. Otherwise, the value can be found in SpecialBigDecimal#bigDecimal.

Constructor & Destructor Documentation

com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.SpecialBigDecimal(BigDecimal val)

Create a finite and real SpecialBigDecimal based on a BigDecimal value.

Parameters

  • val: The internal value.

Member Data Documentation

final SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.NAN

static

Initial value:

=
new SpecialBigDecimal(Double.NaN)

Singleton NaN special value.

Referenced by com.vertica.sdk.StandardTypeCoercion.parseNumber().

final SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.NEGATIVE_INFINITY

static

Initial value:

=
new SpecialBigDecimal(Double.NEGATIVE_INFINITY)

Singleton -Infinity special value.

Referenced by com.vertica.sdk.StandardTypeCoercion.parseNumber().

final SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.POSITIVE_INFINITY

static

Initial value:

=
new SpecialBigDecimal(Double.POSITIVE_INFINITY)

Singleton Infinity special value.

Referenced by com.vertica.sdk.StandardTypeCoercion.parseNumber().