Package additionalTypes
Interface Decimals.DecimalOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Decimals.Decimal,Decimals.Decimal.Builder
- Enclosing class:
- Decimals
public static interface Decimals.DecimalOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetFraction()Number of nano (10^9) units of the amount.intgetPrecision()Represents the precision for the Decimal Precision can only be a positive integer.intgetScale()Represents the scale for the Decimal Scale can be positive, zero or negative.longgetUnits()The whole units of the Decimal.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getUnits
long getUnits()
The whole units of the Decimal. This has to be a whole positive or negative or zero Ex: Units for -89.567800 will be -89
int64 units = 1;- Returns:
- The units.
-
getFraction
int getFraction()
Number of nano (10^9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. Ex: -89.5678000 is represented as `units`=-89 and `nanos`=-567,800,000 (-0.567800 * 10^9)
int32 fraction = 2;- Returns:
- The fraction.
-
getPrecision
int getPrecision()
Represents the precision for the Decimal Precision can only be a positive integer. Ex: -89.567800 has precision of 8
uint32 precision = 3;- Returns:
- The precision.
-
getScale
int getScale()
Represents the scale for the Decimal Scale can be positive, zero or negative. Ex: -89.567800 has scale of 6 -89.567800 represented with scale=0 is -89 -89.567800 represented with scale=-1 is -80
int32 scale = 4;- Returns:
- The scale.
-
-