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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Fraction.BuilderImplements
FractionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Fraction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Fraction.Builder |
build()
public Fraction build()
Type | Description |
Fraction |
buildPartial()
public Fraction buildPartial()
Type | Description |
Fraction |
clear()
public Fraction.Builder clear()
Type | Description |
Fraction.Builder |
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;
Type | Description |
Fraction.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Fraction.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Fraction.Builder |
clearNumerator()
public Fraction.Builder clearNumerator()
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1;
Type | Description |
Fraction.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Fraction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Fraction.Builder |
clone()
public Fraction.Builder clone()
Type | Description |
Fraction.Builder |
getDefaultInstanceForType()
public Fraction getDefaultInstanceForType()
Type | Description |
Fraction |
getDenominator()
public long getDenominator()
The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
int64 denominator = 2;
Type | Description |
long | The denominator. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getNumerator()
public long getNumerator()
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1;
Type | Description |
long | The numerator. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Fraction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Fraction.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Fraction.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Fraction.Builder |
mergeFrom(Fraction other)
public Fraction.Builder mergeFrom(Fraction other)
Name | Description |
other | Fraction |
Type | Description |
Fraction.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Fraction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Fraction.Builder |
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;
Name | Description |
value | long The denominator to set. |
Type | Description |
Fraction.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Fraction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Fraction.Builder |
setNumerator(long value)
public Fraction.Builder setNumerator(long value)
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1;
Name | Description |
value | long The numerator to set. |
Type | Description |
Fraction.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Fraction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Fraction.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Fraction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Fraction.Builder |