Classes | |
class | Metadata |
Public Member Functions | |
int | computeMessageSize (int fieldNumber, K key, V value) |
K | getKey () |
V | 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 |
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.
|
inlineprivate |
Creates a default MapEntryLite message instance.
Definition at line 73 of file MapEntryLite.java.
|
inlineprivate |
Creates a new MapEntryLite message.
Definition at line 81 of file MapEntryLite.java.
|
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.
|
inline |
Definition at line 87 of file MapEntryLite.java.
|
inline |
Definition at line 91 of file MapEntryLite.java.
|
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.
|
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.
|
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.
|
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.
|
private |
Definition at line 69 of file MapEntryLite.java.
|
staticprivate |
Definition at line 65 of file MapEntryLite.java.
|
private |
Definition at line 68 of file MapEntryLite.java.
|
private |
Definition at line 70 of file MapEntryLite.java.
|
staticprivate |
Definition at line 66 of file MapEntryLite.java.