|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.analysis.tabulardata.model.datatype.Numeric
public class Numeric
The type numeric can store numbers with up to 1000 digits of precision and perform calculations exactly. A Numeric is defined with a precision and a scale. The scale of a numeric is the count of decimal digits in the fractional part, to the right of the decimal point. The precision of a numeric is the total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point.
| Constructor Summary | |
|---|---|
Numeric()
Define a Numeric type with default precision and scale |
|
Numeric(int precision)
Creates a Numeric type with a given precision |
|
Numeric(int precision,
int scale)
Creates a Numeric type with a given precision and scale. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
DataTypeEnum |
getDataType()
|
int |
getPrecision()
|
int |
getScale()
|
int |
hashCode()
|
boolean |
hasPrecision()
|
boolean |
hasScale()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Numeric()
public Numeric(int precision)
precision - total count of significant digits in the whole number
public Numeric(int precision,
int scale)
precision - total count of significant digits in the whole numberscale - count of decimal digits in the fractional part
IllegalArgumentException| Method Detail |
|---|
public DataTypeEnum getDataType()
getDataType in interface DataTypepublic boolean hasPrecision()
public int getPrecision()
public boolean hasScale()
public int getScale()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||