public static final class Decimals.Decimal extends com.google.protobuf.GeneratedMessageV3 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 | Class and Description |
|---|---|
static class |
Decimals.Decimal.Builder
Protobuf standard library / WellKnownTypes don't provide a Decimal type.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
FRACTION_FIELD_NUMBER |
static int |
PRECISION_FIELD_NUMBER |
static int |
SCALE_FIELD_NUMBER |
static int |
UNITS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Decimals.Decimal |
getDefaultInstance() |
Decimals.Decimal |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
int |
getFraction()
Number of nano (10^9) units of the amount.
|
com.google.protobuf.Parser<Decimals.Decimal> |
getParserForType() |
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.
|
int |
getSerializedSize() |
long |
getUnits()
The whole units of the Decimal.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Decimals.Decimal.Builder |
newBuilder() |
static Decimals.Decimal.Builder |
newBuilder(Decimals.Decimal prototype) |
Decimals.Decimal.Builder |
newBuilderForType() |
protected Decimals.Decimal.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Decimals.Decimal |
parseDelimitedFrom(InputStream input) |
static Decimals.Decimal |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Decimals.Decimal |
parseFrom(byte[] data) |
static Decimals.Decimal |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Decimals.Decimal |
parseFrom(ByteBuffer data) |
static Decimals.Decimal |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Decimals.Decimal |
parseFrom(com.google.protobuf.ByteString data) |
static Decimals.Decimal |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Decimals.Decimal |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Decimals.Decimal |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Decimals.Decimal |
parseFrom(InputStream input) |
static Decimals.Decimal |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Decimals.Decimal> |
parser() |
Decimals.Decimal.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int UNITS_FIELD_NUMBER
public static final int FRACTION_FIELD_NUMBER
public static final int PRECISION_FIELD_NUMBER
public static final int SCALE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 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 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Decimals.Decimal parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Decimals.Decimal parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Decimals.Decimal parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Decimals.Decimal parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Decimals.Decimal parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Decimals.Decimal parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Decimals.Decimal parseFrom(InputStream input) throws IOException
IOExceptionpublic static Decimals.Decimal parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Decimals.Decimal parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Decimals.Decimal parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Decimals.Decimal parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Decimals.Decimal parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Decimals.Decimal.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Decimals.Decimal.Builder newBuilder()
public static Decimals.Decimal.Builder newBuilder(Decimals.Decimal prototype)
public Decimals.Decimal.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Decimals.Decimal.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Decimals.Decimal getDefaultInstance()
public static com.google.protobuf.Parser<Decimals.Decimal> parser()
public com.google.protobuf.Parser<Decimals.Decimal> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Decimals.Decimal getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.