| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_SCALE
The default scale for a NUMERIC value. |
| public static final int | MAXIMUM_SCALE
The maximum scale. |
| public static final ValueNumeric | ONE
The value 'one'. |
| public static final ValueNumeric | ZERO
The value 'zero'. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Value | |
| public int | compareTypeSafe(Value
the other value o, CompareMode the compare mode mode, CastDataProvider the cast information provider provider)Implements abstract org. Compare this value against another value given that the values are of the same data type. |
| public Value | divide(Value
the divisor v, TypeInfo the type of quotient (used only to read precision and scale
when applicable) quotientType)Overrides org. Divide by a value and return the result. |
| public boolean | equals(Object
the other value other)Implements abstract org. Check if the two values have the same hash code. |
| public static ValueNumeric | Returns: the valuethe big decimal dec)Get or create a NUMERIC value for the given big decimal. |
| public static ValueNumeric | Returns: the valuethe big integer bigInteger)Get or create a NUMERIC value for the given big integer. |
| public static ValueNumeric | Returns: the valuethe big decimal dec)Get or create a NUMERIC value for the given big decimal with possibly negative scale. |
| public BigDecimal | |
| public double | |
| public float | |
| public int | |
| public int | |
| public StringBuilder | getSQL(StringBuilder
string builder builder, int formatting flags sqlFlags)Implements org. Appends the SQL statement of this object to the specified builder. |
| public String | |
| public TypeInfo | getType()
Implements abstract org. Implements org. Returns the data type. |
| public int | |
| public int | hashCode()
Implements abstract org. Returns a hash code value for this object. |
| public Value | modulus(Value
the value to take the modulus with v)Overrides org. Take the modulus with a value and return the result. |
| public Value | multiply(Value
the value to multiply with v)Overrides org. Multiply with a value and return the result. |
| public Value | negate()
Overrides org. Return -value if this value support arithmetic operations. |
| public static BigDecimal | Returns: the scaled valuethe BigDecimal value bd, int the new scale scale)Set the scale of a BigDecimal value. |
| public Value | subtract(Value
the value to subtract v)Overrides org. Subtract a value and return the result. |
| DEFAULT_SCALE | back to summary |
|---|---|
| public static final int DEFAULT_SCALE The default scale for a NUMERIC value. | |
| MAXIMUM_SCALE | back to summary |
|---|---|
| public static final int MAXIMUM_SCALE The maximum scale. | |
| ONE | back to summary |
|---|---|
| public static final ValueNumeric ONE The value 'one'. | |
| ZERO | back to summary |
|---|---|
| public static final ValueNumeric ZERO The value 'zero'. | |
| ValueNumeric | back to summary |
|---|---|
| private ValueNumeric(BigDecimal value) | |
| add | back to summary |
|---|---|
| public Value add(Value v) Overrides org. Doc from org. Add a value and return the result. | |
| compareTypeSafe | back to summary |
|---|---|
| public int compareTypeSafe(Value o, CompareMode mode, CastDataProvider provider) Implements abstract org. Doc from org. Compare this value against another value given that the values are of the same data type.
| |
| divide | back to summary |
|---|---|
| public Value divide(Value v, TypeInfo quotientType) Overrides org. Doc from org. Divide by a value and return the result. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Implements abstract org. Doc from org. Check if the two values have the same hash code. No data conversion is made; this method returns false if the other object is not of the same class. For some values, compareTo may return 0 even if equals return false. Example: ValueDecimal 0.0 and 0.00. | |
| get | back to summary |
|---|---|
| public static ValueNumeric get(BigDecimal dec) Get or create a NUMERIC value for the given big decimal.
| |
| get | back to summary |
|---|---|
| public static ValueNumeric get(BigInteger bigInteger) Get or create a NUMERIC value for the given big integer.
| |
| getAnyScale | back to summary |
|---|---|
| public static ValueNumeric getAnyScale(BigDecimal dec) Get or create a NUMERIC value for the given big decimal with possibly negative scale. If scale is negative, it is normalized to 0.
| |
| getBigDecimal | back to summary |
|---|---|
| public BigDecimal getBigDecimal() Overrides org.
| |
| getDouble | back to summary |
|---|---|
| public double getDouble() Overrides org. Doc from org. Returns this value as a Java
| |
| getFloat | back to summary |
|---|---|
| public float getFloat() Overrides org. Doc from org. Returns this value as a Java
| |
| getMemory | back to summary |
|---|---|
| public int getMemory() Overrides org. Doc from org. Get the memory used by this object.
| |
| getSignum | back to summary |
|---|---|
| public int getSignum() Overrides org.
| |
| getSQL | back to summary |
|---|---|
| public StringBuilder getSQL(StringBuilder builder, int sqlFlags) Implements org. Doc from org. Appends the SQL statement of this object to the specified builder.
| |
| getString | back to summary |
|---|---|
| public String getString() Implements abstract org. Doc from org. Get the value as a string. | |
| getType | back to summary |
|---|---|
| public TypeInfo getType() Implements abstract org. Implements org. Doc from org. Returns the data type. | |
| getValueType | back to summary |
|---|---|
| public int getValueType() Implements abstract org. Doc from org. Get the value type.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract org. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| modulus | back to summary |
|---|---|
| public Value modulus(Value v) Overrides org. Doc from org. Take the modulus with a value and return the result. | |
| multiply | back to summary |
|---|---|
| public Value multiply(Value v) Overrides org. Doc from org. Multiply with a value and return the result. | |
| negate | back to summary |
|---|---|
| public Value negate() Overrides org. Doc from org. Return -value if this value support arithmetic operations. | |
| setScale | back to summary |
|---|---|
| public static BigDecimal setScale(BigDecimal bd, int scale) Set the scale of a BigDecimal value.
| |
| subtract | back to summary |
|---|---|
| public Value subtract(Value v) Overrides org. Doc from org. Subtract a value and return the result. | |