public static final class Fraction.Builder extends GeneratedMessageV3.Builder<Fraction.Builder> implements FractionOrBuilder
Represents a fraction in terms of a numerator divided by a denominator.
Protobuf type google.type.Fraction
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Fraction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Fraction buildPartial()
clear()
public Fraction.Builder clear()
Overrides
clearDenominator()
public Fraction.Builder clearDenominator()
The value by which the numerator is divided, e.g. 3 in 2/3. Must be
positive.
int64 denominator = 2;
clearField(Descriptors.FieldDescriptor field)
public Fraction.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearNumerator()
public Fraction.Builder clearNumerator()
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public Fraction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public Fraction.Builder clone()
Overrides
getDefaultInstanceForType()
public Fraction getDefaultInstanceForType()
getDenominator()
public long getDenominator()
The value by which the numerator is divided, e.g. 3 in 2/3. Must be
positive.
int64 denominator = 2;
Returns |
Type |
Description |
long |
The denominator.
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getNumerator()
public long getNumerator()
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1;
Returns |
Type |
Description |
long |
The numerator.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
public Fraction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Fraction.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeFrom(Fraction other)
public Fraction.Builder mergeFrom(Fraction other)
Parameter |
Name |
Description |
other |
Fraction
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Fraction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setDenominator(long value)
public Fraction.Builder setDenominator(long value)
The value by which the numerator is divided, e.g. 3 in 2/3. Must be
positive.
int64 denominator = 2;
Parameter |
Name |
Description |
value |
long
The denominator to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public Fraction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setNumerator(long value)
public Fraction.Builder setNumerator(long value)
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1;
Parameter |
Name |
Description |
value |
long
The numerator to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Fraction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Fraction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides