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
Name Description
defaultInstance MessageLite
extensionRegistry ExtensionRegistryLite
bytes ByteString

Methods

containsDefaultInstance()

public boolean containsDefaultInstance()

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

Returns
Type Description
boolean
Overrides

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getValue()

public MessageLite getValue()
Returns
Type Description
MessageLite

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides