public static final class Decimals.Decimal.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder> implements Decimals.DecimalOrBuilder
Protobuf standard library / WellKnownTypes don't provide a Decimal type. This posses a challenge to represent Decimals that cannot be accurately represented using float or double types. Related issue: https://github.com/protocolbuffers/protobuf/issues/4406Protobuf type
additionalTypes.Decimal| Modifier and Type | Method and Description |
|---|---|
Decimals.Decimal.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Decimals.Decimal |
build() |
Decimals.Decimal |
buildPartial() |
Decimals.Decimal.Builder |
clear() |
Decimals.Decimal.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Decimals.Decimal.Builder |
clearFraction()
Number of nano (10^9) units of the amount.
|
Decimals.Decimal.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Decimals.Decimal.Builder |
clearPrecision()
Represents the precision for the Decimal
Precision can only be a positive integer.
|
Decimals.Decimal.Builder |
clearScale()
Represents the scale for the Decimal
Scale can be positive, zero or negative.
|
Decimals.Decimal.Builder |
clearUnits()
The whole units of the Decimal.
|
Decimals.Decimal.Builder |
clone() |
Decimals.Decimal |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getFraction()
Number of nano (10^9) units of the amount.
|
int |
getPrecision()
Represents the precision for the Decimal
Precision can only be a positive integer.
|
int |
getScale()
Represents the scale for the Decimal
Scale can be positive, zero or negative.
|
long |
getUnits()
The whole units of the Decimal.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Decimals.Decimal.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Decimals.Decimal.Builder |
mergeFrom(Decimals.Decimal other) |
Decimals.Decimal.Builder |
mergeFrom(com.google.protobuf.Message other) |
Decimals.Decimal.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Decimals.Decimal.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Decimals.Decimal.Builder |
setFraction(int value)
Number of nano (10^9) units of the amount.
|
Decimals.Decimal.Builder |
setPrecision(int value)
Represents the precision for the Decimal
Precision can only be a positive integer.
|
Decimals.Decimal.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Decimals.Decimal.Builder |
setScale(int value)
Represents the scale for the Decimal
Scale can be positive, zero or negative.
|
Decimals.Decimal.Builder |
setUnits(long value)
The whole units of the Decimal.
|
Decimals.Decimal.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Decimals.Decimal build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Decimals.Decimal buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Decimals.Decimal.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder mergeFrom(Decimals.Decimal other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public Decimals.Decimal.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Decimals.Decimal.Builder>IOExceptionpublic 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;getUnits in interface Decimals.DecimalOrBuilderpublic Decimals.Decimal.Builder setUnits(long value)
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;value - The units to set.public Decimals.Decimal.Builder clearUnits()
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;public 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;getFraction in interface Decimals.DecimalOrBuilderpublic Decimals.Decimal.Builder setFraction(int value)
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;value - The fraction to set.public Decimals.Decimal.Builder clearFraction()
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;public 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;getPrecision in interface Decimals.DecimalOrBuilderpublic Decimals.Decimal.Builder setPrecision(int value)
Represents the precision for the Decimal Precision can only be a positive integer. Ex: -89.567800 has precision of 8
uint32 precision = 3;value - The precision to set.public Decimals.Decimal.Builder clearPrecision()
Represents the precision for the Decimal Precision can only be a positive integer. Ex: -89.567800 has precision of 8
uint32 precision = 3;public 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;getScale in interface Decimals.DecimalOrBuilderpublic Decimals.Decimal.Builder setScale(int value)
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;value - The scale to set.public Decimals.Decimal.Builder clearScale()
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;public final Decimals.Decimal.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>public final Decimals.Decimal.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Decimals.Decimal.Builder>Copyright © 2024. All rights reserved.