webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
com.google.protobuf.UnmodifiableLazyStringList Class Reference
Inheritance diagram for com.google.protobuf.UnmodifiableLazyStringList:
com.google.protobuf.LazyStringList com.google.protobuf.ProtocolStringList

Public Member Functions

 UnmodifiableLazyStringList (LazyStringList list)
 
String get (int index)
 
Object getRaw (int index)
 
int size ()
 
ByteString getByteString (int index)
 
void add (ByteString element)
 
void set (int index, ByteString element)
 
boolean addAllByteString (Collection<? extends ByteString > element)
 
byte [] getByteArray (int index)
 
void add (byte[] element)
 
void set (int index, byte[] element)
 
boolean addAllByteArray (Collection< byte[]> element)
 
ListIterator< String > listIterator (final int index)
 
Iterator< String > iterator ()
 
List<?> getUnderlyingElements ()
 
void mergeFrom (LazyStringList other)
 
List< byte[]> asByteArrayList ()
 
List< ByteStringasByteStringList ()
 
LazyStringList getUnmodifiableView ()
 

Detailed Description

An implementation of LazyStringList that wraps another LazyStringList such that it cannot be modified via the wrapper.

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

Constructor & Destructor Documentation

◆ UnmodifiableLazyStringList()

com.google.protobuf.UnmodifiableLazyStringList.UnmodifiableLazyStringList ( LazyStringList  list)
inline

Member Function Documentation

◆ add() [1/2]

void com.google.protobuf.UnmodifiableLazyStringList.add ( ByteString  element)
inline

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

Implements com.google.protobuf.LazyStringList.

◆ add() [2/2]

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

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

Implements com.google.protobuf.LazyStringList.

◆ addAllByteArray()

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

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

Implements com.google.protobuf.LazyStringList.

◆ addAllByteString()

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

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

Implements com.google.protobuf.LazyStringList.

◆ asByteArrayList()

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

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.

Implements com.google.protobuf.LazyStringList.

◆ asByteStringList()

List<ByteString> com.google.protobuf.UnmodifiableLazyStringList.asByteStringList ( )
inline

Returns a view of the data as a list of ByteStrings.

Implements com.google.protobuf.ProtocolStringList.

◆ get()

String com.google.protobuf.UnmodifiableLazyStringList.get ( int  index)
inline

◆ getByteArray()

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

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 ( )

Implements com.google.protobuf.LazyStringList.

◆ getByteString()

ByteString com.google.protobuf.UnmodifiableLazyStringList.getByteString ( int  index)
inline

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 ( )

Implements com.google.protobuf.LazyStringList.

◆ getRaw()

Object com.google.protobuf.UnmodifiableLazyStringList.getRaw ( int  index)
inline

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 ( )

Implements com.google.protobuf.LazyStringList.

◆ getUnderlyingElements()

List<?> com.google.protobuf.UnmodifiableLazyStringList.getUnderlyingElements ( )
inline

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

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 UnsupportedOperationException.

Implements com.google.protobuf.LazyStringList.

◆ getUnmodifiableView()

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

Returns an unmodifiable view of the list.

Implements com.google.protobuf.LazyStringList.

◆ iterator()

Iterator<String> com.google.protobuf.UnmodifiableLazyStringList.iterator ( )
inline

◆ listIterator()

ListIterator<String> com.google.protobuf.UnmodifiableLazyStringList.listIterator ( final int  index)
inline

◆ mergeFrom()

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

Merges all elements from another LazyStringList into this one. This method differs from addAll(Collection) on that underlying byte arrays are copied instead of reference shared. Immutable API doesn't need to use this method as byte[] is not used there at all.

Implements com.google.protobuf.LazyStringList.

◆ set() [1/2]

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

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 ( )

Implements com.google.protobuf.LazyStringList.

◆ set() [2/2]

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

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 ( )

Implements com.google.protobuf.LazyStringList.

◆ size()

int com.google.protobuf.UnmodifiableLazyStringList.size ( )
inline

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