Class MapEntry.Builder<K,V> (3.19.4)

public static class MapEntry.Builder<K,V> extends AbstractMessage.Builder<MapEntry.Builder<K,V>>

Builder to create MapEntry messages.

Type Parameters

NameDescription
K
V

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MapEntry.Builder<K,V> addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
Builder<K,V>

build()

public MapEntry<K,V> build()
Returns
TypeDescription
MapEntry<K,V>

buildPartial()

public MapEntry<K,V> buildPartial()
Returns
TypeDescription
MapEntry<K,V>

clearField(Descriptors.FieldDescriptor field)

public MapEntry.Builder<K,V> clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
Builder<K,V>

clearKey()

public MapEntry.Builder<K,V> clearKey()
Returns
TypeDescription
Builder<K,V>

clearValue()

public MapEntry.Builder<K,V> clearValue()
Returns
TypeDescription
Builder<K,V>

clone()

public MapEntry.Builder<K,V> clone()

Clones the Builder.

Returns
TypeDescription
Builder<K,V>
Overrides

getAllFields()

public Map<Descriptors.FieldDescriptor,Object> getAllFields()
Returns
TypeDescription
Map<FieldDescriptor,Object>

getDefaultInstanceForType()

public MapEntry<K,V> getDefaultInstanceForType()
Returns
TypeDescription
MapEntry<K,V>

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptors.Descriptor

getField(Descriptors.FieldDescriptor field)

public Object getField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
Object

getKey()

public K getKey()
Returns
TypeDescription
K

getRepeatedField(Descriptors.FieldDescriptor field, int index)

public Object getRepeatedField(Descriptors.FieldDescriptor field, int index)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
indexint
Returns
TypeDescription
Object

getRepeatedFieldCount(Descriptors.FieldDescriptor field)

public int getRepeatedFieldCount(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
int

getUnknownFields()

public UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet

getValue()

public V getValue()
Returns
TypeDescription
V

hasField(Descriptors.FieldDescriptor field)

public boolean hasField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
boolean

isInitialized()

public boolean isInitialized()
Returns
TypeDescription
boolean

newBuilderForField(Descriptors.FieldDescriptor field)

public Message.Builder newBuilderForField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
Message.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MapEntry.Builder<K,V> setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
Builder<K,V>

setKey(K key)

public MapEntry.Builder<K,V> setKey(K key)
Parameter
NameDescription
keyK
Returns
TypeDescription
Builder<K,V>

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

public MapEntry.Builder<K,V> setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
indexint
valueObject
Returns
TypeDescription
Builder<K,V>

setUnknownFields(UnknownFieldSet unknownFields)

public MapEntry.Builder<K,V> setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Builder<K,V>

setValue(V value)

public MapEntry.Builder<K,V> setValue(V value)
Parameter
NameDescription
valueV
Returns
TypeDescription
Builder<K,V>