|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.olap4j.type.ScalarType
org.olap4j.type.NumericType
org.olap4j.type.DecimalType
public class DecimalType
Subclass of NumericType which guarantees fixed number of decimal
places. In particular, a decimal with zero scale is an integer.
| Constructor Summary | |
|---|---|
DecimalType(int precision,
int scale)
Creates a decimal type with precision and scale. |
|
| Method Summary | |
|---|---|
int |
getPrecision()
Returns the maximum number of decimal digits which a value of this type can have. |
int |
getScale()
Returns the number of digits to the right of the decimal point. |
String |
toString()
|
| Methods inherited from class org.olap4j.type.ScalarType |
|---|
getDimension, getHierarchy, getLevel, usesDimension |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DecimalType(int precision,
int scale)
Examples:
The largest value is 10 ^ (precision - scale). Hence the largest
DECIMAL(5, -3) value is 10 ^ 8.
precision - Maximum number of decimal digits which a value of
this type can have.
Must be greater than zero.
Use Integer.MAX_VALUE if the precision is unbounded.scale - Number of digits to the right of the decimal point.| Method Detail |
|---|
public int getPrecision()
public int getScale()
public String toString()
toString in class NumericType
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||