Package com.google.type
Class Fraction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Fraction,Fraction.Builder>
com.google.type.Fraction.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,FractionOrBuilder
,Cloneable
- Enclosing class:
- Fraction
public static final class Fraction.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Fraction,Fraction.Builder>
implements FractionOrBuilder
Represents a fraction in terms of a numerator divided by a denominator.Protobuf type
google.type.Fraction
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionThe value by which the numerator is divided, e.g.The numerator in the fraction, e.g.long
The value by which the numerator is divided, e.g.long
The numerator in the fraction, e.g.setDenominator
(long value) The value by which the numerator is divided, e.g.setNumerator
(long value) The numerator in the fraction, e.g.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getNumerator
public long getNumerator()The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1 [json_name = "numerator"];
- Specified by:
getNumerator
in interfaceFractionOrBuilder
- Returns:
- The numerator.
-
setNumerator
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1 [json_name = "numerator"];
- Parameters:
value
- The numerator to set.- Returns:
- This builder for chaining.
-
clearNumerator
The numerator in the fraction, e.g. 2 in 2/3.
int64 numerator = 1 [json_name = "numerator"];
- Returns:
- This builder for chaining.
-
getDenominator
public long getDenominator()The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
int64 denominator = 2 [json_name = "denominator"];
- Specified by:
getDenominator
in interfaceFractionOrBuilder
- Returns:
- The denominator.
-
setDenominator
The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
int64 denominator = 2 [json_name = "denominator"];
- Parameters:
value
- The denominator to set.- Returns:
- This builder for chaining.
-
clearDenominator
The value by which the numerator is divided, e.g. 3 in 2/3. Must be positive.
int64 denominator = 2 [json_name = "denominator"];
- Returns:
- This builder for chaining.
-