Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.google.protobuf.MapEntryLite< K, V > Class Template Reference

Classes

class  Metadata
 

Public Member Functions

int computeMessageSize (int fieldNumber, K key, V value)
 
K getKey ()
 
getValue ()
 
Map.Entry< K, V > parseEntry (ByteString bytes, ExtensionRegistryLite extensionRegistry) throws IOException
 
void parseInto (MapFieldLite< K, V > map, CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
void serializeTo (CodedOutputStream output, int fieldNumber, K key, V value) throws IOException
 

Static Public Member Functions

static< K, V > MapEntryLite< K, V > newDefaultInstance (WireFormat.FieldType keyType, K defaultKey, WireFormat.FieldType valueType, V defaultValue)
 

Private Member Functions

 MapEntryLite (Metadata< K, V > metadata, K key, V value)
 
 MapEntryLite (WireFormat.FieldType keyType, K defaultKey, WireFormat.FieldType valueType, V defaultValue)
 

Private Attributes

final K key
 
final Metadata< K, V > metadata
 
final V value
 

Static Private Attributes

static final int KEY_FIELD_NUMBER = 1
 
static final int VALUE_FIELD_NUMBER = 2
 

Detailed Description

Implements the lite version of map entry messages.

This class serves as an utility class to help do serialization/parsing of map entries. It's used in generated code and also in the full version MapEntry message.

Protobuf internal. Users shouldn't use.

Definition at line 45 of file MapEntryLite.java.

Constructor & Destructor Documentation

◆ MapEntryLite() [1/2]

com.google.protobuf.MapEntryLite< K, V >.MapEntryLite ( WireFormat.FieldType  keyType,
K  defaultKey,
WireFormat.FieldType  valueType,
defaultValue 
)
inlineprivate

Creates a default MapEntryLite message instance.

Definition at line 73 of file MapEntryLite.java.

◆ MapEntryLite() [2/2]

com.google.protobuf.MapEntryLite< K, V >.MapEntryLite ( Metadata< K, V >  metadata,
K  key,
value 
)
inlineprivate

Creates a new MapEntryLite message.

Definition at line 81 of file MapEntryLite.java.

Member Function Documentation

◆ computeMessageSize()

int com.google.protobuf.MapEntryLite< K, V >.computeMessageSize ( int  fieldNumber,
K  key,
value 
)
inline

Computes the message size for the provided key and value as though they were wrapped by a MapEntryLite. This helper method avoids allocation of a MapEntryLite built with a key and value and is called from generated code directly.

Definition at line 156 of file MapEntryLite.java.

◆ getKey()

K com.google.protobuf.MapEntryLite< K, V >.getKey ( )
inline

Definition at line 87 of file MapEntryLite.java.

◆ getValue()

V com.google.protobuf.MapEntryLite< K, V >.getValue ( )
inline

Definition at line 91 of file MapEntryLite.java.

◆ newDefaultInstance()

static <K, V> MapEntryLite<K, V> com.google.protobuf.MapEntryLite< K, V >.newDefaultInstance ( WireFormat.FieldType  keyType,
K  defaultKey,
WireFormat.FieldType  valueType,
defaultValue 
)
inlinestatic

Creates a default MapEntryLite message instance.

This method is used by generated code to create the default instance for a map entry message. The created default instance should be used to create new map entry messages of the same type. For each map entry message, only one default instance should be created.

Definition at line 102 of file MapEntryLite.java.

◆ parseEntry()

Map.Entry<K, V> com.google.protobuf.MapEntryLite< K, V >.parseEntry ( ByteString  bytes,
ExtensionRegistryLite  extensionRegistry 
) throws IOException
inline

Parses an entry off of the input as a Map.Entry. This helper requires an allocation so using parseInto is preferred if possible.

Definition at line 166 of file MapEntryLite.java.

◆ parseInto()

void com.google.protobuf.MapEntryLite< K, V >.parseInto ( MapFieldLite< K, V >  map,
CodedInputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException
inline

Parses an entry off of the input into the map. This helper avoids allocaton of a {} by parsing directly into the provided MapFieldLite}.

Definition at line 198 of file MapEntryLite.java.

◆ serializeTo()

void com.google.protobuf.MapEntryLite< K, V >.serializeTo ( CodedOutputStream  output,
int  fieldNumber,
K  key,
value 
) throws IOException
inline

Serializes the provided key and value as though they were wrapped by a MapEntryLite to the output stream. This helper method avoids allocation of a MapEntryLite built with a key and value and is called from generated code directly.

Definition at line 144 of file MapEntryLite.java.

Member Data Documentation

◆ key

final K com.google.protobuf.MapEntryLite< K, V >.key
private

Definition at line 69 of file MapEntryLite.java.

◆ KEY_FIELD_NUMBER

final int com.google.protobuf.MapEntryLite< K, V >.KEY_FIELD_NUMBER = 1
staticprivate

Definition at line 65 of file MapEntryLite.java.

◆ metadata

final Metadata<K, V> com.google.protobuf.MapEntryLite< K, V >.metadata
private

Definition at line 68 of file MapEntryLite.java.

◆ value

final V com.google.protobuf.MapEntryLite< K, V >.value
private

Definition at line 70 of file MapEntryLite.java.

◆ VALUE_FIELD_NUMBER

final int com.google.protobuf.MapEntryLite< K, V >.VALUE_FIELD_NUMBER = 2
staticprivate

Definition at line 66 of file MapEntryLite.java.


The documentation for this class was generated from the following file:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:07