Public Member Functions | List of all members
com.google.protobuf.LazyStringList Interface Reference
Inheritance diagram for com.google.protobuf.LazyStringList:
Inheritance graph
[legend]

Public Member Functions

void add (byte[] element)
 
void add (byte[] element)
 
void add (ByteString element)
 
void add (ByteString element)
 
boolean addAllByteArray (Collection< byte[]> c)
 
boolean addAllByteArray (Collection< byte[]> c)
 
boolean addAllByteString (Collection<? extends ByteString > c)
 
boolean addAllByteString (Collection<? extends ByteString > c)
 
List< byte[]> asByteArrayList ()
 
List< byte[]> asByteArrayList ()
 
byte[] getByteArray (int index)
 
byte[] getByteArray (int index)
 
ByteString getByteString (int index)
 
ByteString getByteString (int index)
 
Object getRaw (int index)
 
Object getRaw (int index)
 
List<?> getUnderlyingElements ()
 
List<?> getUnderlyingElements ()
 
LazyStringList getUnmodifiableView ()
 
LazyStringList getUnmodifiableView ()
 
void mergeFrom (LazyStringList other)
 
void mergeFrom (LazyStringList other)
 
void set (int index, byte[] element)
 
void set (int index, byte[] element)
 
void set (int index, ByteString element)
 
void set (int index, ByteString element)
 
- Public Member Functions inherited from com.google.protobuf.ProtocolStringList
List< ByteStringasByteStringList ()
 
List< ByteStringasByteStringList ()
 

Detailed Description

An interface extending

List<String>

that also provides access to the items of the list as UTF8-encoded ByteString or byte[] objects. This is used by the protocol buffer implementation to support lazily converting bytes parsed over the wire to String objects until needed and also increases the efficiency of serialization if the String was never requested as the ByteString or byte[] is already cached. The ByteString methods are used in immutable API only and byte[] methods used in mutable API only for they use different representations for string/bytes fields.

Author
jonp@.nosp@m.goog.nosp@m.le.co.nosp@m.m (Jon Perlow)

Definition at line 46 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringList.java.

Member Function Documentation

◆ add() [1/4]

void com.google.protobuf.LazyStringList.add ( byte[]  element)

Appends the specified element to the end of this list (optional operation).

Parameters
elementelement to be appended to this list
Exceptions
UnsupportedOperationExceptionif the add operation is not supported by this list

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ add() [2/4]

void com.google.protobuf.LazyStringList.add ( byte[]  element)

Appends the specified element to the end of this list (optional operation).

Parameters
elementelement to be appended to this list
Exceptions
UnsupportedOperationExceptionif the add operation is not supported by this list

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ add() [3/4]

void com.google.protobuf.LazyStringList.add ( ByteString  element)

Appends the specified element to the end of this list (optional operation).

Parameters
elementelement to be appended to this list
Exceptions
UnsupportedOperationExceptionif the add operation is not supported by this list

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ add() [4/4]

void com.google.protobuf.LazyStringList.add ( ByteString  element)

Appends the specified element to the end of this list (optional operation).

Parameters
elementelement to be appended to this list
Exceptions
UnsupportedOperationExceptionif the add operation is not supported by this list

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ addAllByteArray() [1/2]

boolean com.google.protobuf.LazyStringList.addAllByteArray ( Collection< byte[]>  c)

Appends all elements in the specified byte[] collection to the end of this list.

Parameters
ccollection whose elements are to be added to this list
Returns
true if this list changed as a result of the call
Exceptions
UnsupportedOperationExceptionif the addAllByteArray operation is not supported by this list

Implemented in com.google.protobuf.UnmodifiableLazyStringList, com.google.protobuf.UnmodifiableLazyStringList, com.google.protobuf.LazyStringArrayList, and com.google.protobuf.LazyStringArrayList.

◆ addAllByteArray() [2/2]

boolean com.google.protobuf.LazyStringList.addAllByteArray ( Collection< byte[]>  c)

Appends all elements in the specified byte[] collection to the end of this list.

Parameters
ccollection whose elements are to be added to this list
Returns
true if this list changed as a result of the call
Exceptions
UnsupportedOperationExceptionif the addAllByteArray operation is not supported by this list

Implemented in com.google.protobuf.UnmodifiableLazyStringList, com.google.protobuf.UnmodifiableLazyStringList, com.google.protobuf.LazyStringArrayList, and com.google.protobuf.LazyStringArrayList.

◆ addAllByteString() [1/2]

boolean com.google.protobuf.LazyStringList.addAllByteString ( Collection<? extends ByteString c)

Appends all elements in the specified ByteString collection to the end of this list.

Parameters
ccollection whose elements are to be added to this list
Returns
true if this list changed as a result of the call
Exceptions
UnsupportedOperationExceptionif the addAllByteString operation is not supported by this list

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ addAllByteString() [2/2]

boolean com.google.protobuf.LazyStringList.addAllByteString ( Collection<? extends ByteString c)

Appends all elements in the specified ByteString collection to the end of this list.

Parameters
ccollection whose elements are to be added to this list
Returns
true if this list changed as a result of the call
Exceptions
UnsupportedOperationExceptionif the addAllByteString operation is not supported by this list

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ asByteArrayList() [1/2]

List<byte[]> com.google.protobuf.LazyStringList.asByteArrayList ( )

Returns a mutable view of this list. Changes to the view will be made into the original list. This method is used in mutable API only.

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ asByteArrayList() [2/2]

List<byte[]> com.google.protobuf.LazyStringList.asByteArrayList ( )

Returns a mutable view of this list. Changes to the view will be made into the original list. This method is used in mutable API only.

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getByteArray() [1/2]

byte [] com.google.protobuf.LazyStringList.getByteArray ( int  index)

Returns the element at the specified position in this list as byte[].

Parameters
indexindex of the element to return
Returns
the element at the specified position in this list
Exceptions
IndexOutOfBoundsExceptionif the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getByteArray() [2/2]

byte [] com.google.protobuf.LazyStringList.getByteArray ( int  index)

Returns the element at the specified position in this list as byte[].

Parameters
indexindex of the element to return
Returns
the element at the specified position in this list
Exceptions
IndexOutOfBoundsExceptionif the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getByteString() [1/2]

ByteString com.google.protobuf.LazyStringList.getByteString ( int  index)

Returns the element at the specified position in this list as a ByteString.

Parameters
indexindex of the element to return
Returns
the element at the specified position in this list
Exceptions
IndexOutOfBoundsExceptionif the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getByteString() [2/2]

ByteString com.google.protobuf.LazyStringList.getByteString ( int  index)

Returns the element at the specified position in this list as a ByteString.

Parameters
indexindex of the element to return
Returns
the element at the specified position in this list
Exceptions
IndexOutOfBoundsExceptionif the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getRaw() [1/2]

Object com.google.protobuf.LazyStringList.getRaw ( int  index)

Returns the element at the specified position in this list as an Object that will either be a String or a ByteString.

Parameters
indexindex of the element to return
Returns
the element at the specified position in this list
Exceptions
IndexOutOfBoundsExceptionif the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getRaw() [2/2]

Object com.google.protobuf.LazyStringList.getRaw ( int  index)

Returns the element at the specified position in this list as an Object that will either be a String or a ByteString.

Parameters
indexindex of the element to return
Returns
the element at the specified position in this list
Exceptions
IndexOutOfBoundsExceptionif the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getUnderlyingElements() [1/2]

List<?> com.google.protobuf.LazyStringList.getUnderlyingElements ( )

Returns an unmodifiable List of the underlying elements, each of which is either a

String

or its equivalent UTF-8 encoded

ByteString

or byte[]. It is an error for the caller to modify the returned List, and attempting to do so will result in an {}.

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getUnderlyingElements() [2/2]

List<?> com.google.protobuf.LazyStringList.getUnderlyingElements ( )

Returns an unmodifiable List of the underlying elements, each of which is either a

String

or its equivalent UTF-8 encoded

ByteString

or byte[]. It is an error for the caller to modify the returned List, and attempting to do so will result in an {}.

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ getUnmodifiableView() [1/2]

LazyStringList com.google.protobuf.LazyStringList.getUnmodifiableView ( )

◆ getUnmodifiableView() [2/2]

LazyStringList com.google.protobuf.LazyStringList.getUnmodifiableView ( )

◆ mergeFrom() [1/2]

void com.google.protobuf.LazyStringList.mergeFrom ( LazyStringList  other)

◆ mergeFrom() [2/2]

void com.google.protobuf.LazyStringList.mergeFrom ( LazyStringList  other)

◆ set() [1/4]

void com.google.protobuf.LazyStringList.set ( int  index,
byte[]  element 
)

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
indexindex of the element to replace
elementthe element to be stored at the specified position
Exceptions
UnsupportedOperationExceptionif the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ set() [2/4]

void com.google.protobuf.LazyStringList.set ( int  index,
byte[]  element 
)

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
indexindex of the element to replace
elementthe element to be stored at the specified position
Exceptions
UnsupportedOperationExceptionif the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ set() [3/4]

void com.google.protobuf.LazyStringList.set ( int  index,
ByteString  element 
)

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
indexindex of the element to replace
elementthe element to be stored at the specified position
Exceptions
UnsupportedOperationExceptionif the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.

◆ set() [4/4]

void com.google.protobuf.LazyStringList.set ( int  index,
ByteString  element 
)

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
indexindex of the element to replace
elementthe element to be stored at the specified position
Exceptions
UnsupportedOperationExceptionif the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (
index < 0 || index >=
size()
)

Implemented in com.google.protobuf.LazyStringArrayList, com.google.protobuf.LazyStringArrayList, com.google.protobuf.UnmodifiableLazyStringList, and com.google.protobuf.UnmodifiableLazyStringList.


The documentation for this interface was generated from the following file:
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:06