Class LazyField (3.19.4)

public class LazyField extends LazyFieldLite

LazyField encapsulates the logic of lazily parsing message fields. It stores the message in a ByteString initially and then parses it on-demand.

Most methods are implemented in LazyFieldLite but this class can contain a default instance of the message to provide hashCode(), equals(), and toString().

Inheritance

Object > LazyFieldLite > LazyField

Constructors

LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)

public LazyField(MessageLite defaultInstance, ExtensionRegistryLite extensionRegistry, ByteString bytes)
Parameters
NameDescription
defaultInstanceMessageLite
extensionRegistryExtensionRegistryLite
bytesByteString

Methods

containsDefaultInstance()

public boolean containsDefaultInstance()

Determines whether this LazyFieldLite instance represents the default instance of this type.

Returns
TypeDescription
boolean
Overrides

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getValue()

public MessageLite getValue()
Returns
TypeDescription
MessageLite

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

toString()

public String toString()
Returns
TypeDescription
String
Overrides