Class DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder (3.19.4)

public static final class DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder extends GeneratedMessageV3.Builder<DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder> implements DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder

Range of reserved numeric values. Reserved values may not be used by entries in the same enum. Reserved ranges may not overlap. Note that this is distinct from DescriptorProto.ReservedRange in that it is inclusive such that it can appropriately represent the entire int32 domain.

Protobuf type google.protobuf.EnumDescriptorProto.EnumReservedRange

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptors.Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

build()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange build()
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange

buildPartial()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange buildPartial()
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange

clear()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder clear()

Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

clearEnd()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder clearEnd()

Inclusive.

optional int32 end = 2;

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field Descriptors.FieldDescriptor
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder clearOneof(Descriptors.OneofDescriptor oneof)

TODO(jieluo): Clear it when all subclasses have implemented this method.

Parameter
Name Description
oneof Descriptors.OneofDescriptor
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

clearStart()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder clearStart()

Inclusive.

optional int32 start = 1;

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

This builder for chaining.

clone()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder clone()

Clones the Builder.

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

getDefaultInstanceForType()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange getDefaultInstanceForType()

Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()

Get the message's type's descriptor. This differs from the getDescriptor() method of generated message classes in that this method is an abstract method of the Message interface whereas getDescriptor() is a static method of a specific class. They return the same thing.

Returns
Type Description
Descriptors.Descriptor
Overrides

getEnd()

public int getEnd()

Inclusive.

optional int32 end = 2;

Returns
Type Description
int

The end.

getStart()

public int getStart()

Inclusive.

optional int32 start = 1;

Returns
Type Description
int

The start.

hasEnd()

public boolean hasEnd()

Inclusive.

optional int32 end = 2;

Returns
Type Description
boolean

Whether the end field is set.

hasStart()

public boolean hasStart()

Inclusive.

optional int32 start = 1;

Returns
Type Description
boolean

Whether the start field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.

Returns
Type Description
GeneratedMessageV3.FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in extensionRegistry. Extensions not in the registry will be treated as unknown fields.

Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(DescriptorProtos.EnumDescriptorProto.EnumReservedRange other)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder mergeFrom(DescriptorProtos.EnumDescriptorProto.EnumReservedRange other)
Parameter
Name Description
other DescriptorProtos.EnumDescriptorProto.EnumReservedRange
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

mergeFrom(Message other)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder mergeFrom(Message other)

Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

Merging occurs as follows. For each field:

  • For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
  • For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
  • For repeated fields, the elements in other are concatenated with the elements in this message.
  • For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

    This is equivalent to the Message::MergeFrom method in C++.

Parameter
Name Description
other Message
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

setEnd(int value)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder setEnd(int value)

Inclusive.

optional int32 end = 2;

Parameter
Name Description
value int

The end to set.

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
index int
value Object
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides

setStart(int value)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder setStart(int value)

Inclusive.

optional int32 start = 1;

Parameter
Name Description
value int

The start to set.

Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Overrides