Classes | |
class | ByteArrayListView |
class | ByteStringListView |
Static Public Attributes | |
static final LazyStringList | EMPTY = EMPTY_LIST |
Private Member Functions | |
void | add (int index, byte[] element) |
void | add (int index, byte[] element) |
void | add (int index, ByteString element) |
void | add (int index, ByteString element) |
LazyStringArrayList (ArrayList< Object > list) | |
LazyStringArrayList (ArrayList< Object > list) | |
Object | setAndReturn (int index, byte[] s) |
Object | setAndReturn (int index, byte[] s) |
Object | setAndReturn (int index, ByteString s) |
Object | setAndReturn (int index, ByteString s) |
Static Private Member Functions | |
static byte[] | asByteArray (Object o) |
static byte[] | asByteArray (Object o) |
static ByteString | asByteString (Object o) |
static ByteString | asByteString (Object o) |
static String | asString (Object o) |
static String | asString (Object o) |
Private Attributes | |
final List< Object > | list |
Static Private Attributes | |
static final LazyStringArrayList | EMPTY_LIST = new LazyStringArrayList() |
An implementation of LazyStringList that wraps an ArrayList. Each element is one of String, ByteString, or byte[]. It caches the last one requested which is most likely the one needed next. This minimizes memory usage while satisfying the most common use cases.
Note that this implementation is not synchronized. If multiple threads access an ArrayList
instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list.
If the implementation is accessed via concurrent reads, this is thread safe. Conversions are done in a thread safe manner. It's possible that the conversion may happen more than once if two threads attempt to access the same element and the modifications were not visible to each other, but this will not result in any corruption of the list or change in behavior other than performance.
Definition at line 61 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 79 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 83 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 87 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 92 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 96 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 79 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 83 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 87 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 92 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 96 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends the specified element to the end of this list (optional operation).
element | element to be appended to this list |
UnsupportedOperationException | if the add operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 223 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends the specified element to the end of this list (optional operation).
element | element to be appended to this list |
UnsupportedOperationException | if the add operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 223 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends the specified element to the end of this list (optional operation).
element | element to be appended to this list |
UnsupportedOperationException | if the add operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 216 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends the specified element to the end of this list (optional operation).
element | element to be appended to this list |
UnsupportedOperationException | if the add operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 216 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 157 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 157 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 151 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 151 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 145 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 145 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 164 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 164 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 173 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 173 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends all elements in the specified byte[] collection to the end of this list.
c | collection whose elements are to be added to this list |
UnsupportedOperationException | if the addAllByteArray operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 193 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends all elements in the specified byte[] collection to the end of this list.
c | collection whose elements are to be added to this list |
UnsupportedOperationException | if the addAllByteArray operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 193 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends all elements in the specified ByteString collection to the end of this list.
c | collection whose elements are to be added to this list |
UnsupportedOperationException | if the addAllByteString operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 185 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Appends all elements in the specified ByteString collection to the end of this list.
c | collection whose elements are to be added to this list |
UnsupportedOperationException | if the addAllByteString operation is not supported by this list |
Implements com.google.protobuf.LazyStringList.
Definition at line 185 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlinestaticprivate |
Definition at line 294 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlinestaticprivate |
Definition at line 294 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
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.
Definition at line 363 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
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.
Definition at line 363 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlinestaticprivate |
Definition at line 284 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlinestaticprivate |
Definition at line 284 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns a view of the data as a list of ByteStrings.
Implements com.google.protobuf.ProtocolStringList.
Definition at line 406 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns a view of the data as a list of ByteStrings.
Implements com.google.protobuf.ProtocolStringList.
Definition at line 406 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlinestaticprivate |
Definition at line 274 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlinestaticprivate |
Definition at line 274 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 209 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 209 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 111 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 111 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns the element at the specified position in this list as byte[].
index | index of the element to return |
IndexOutOfBoundsException | if the index is out of range ( index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 245 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns the element at the specified position in this list as byte[].
index | index of the element to return |
IndexOutOfBoundsException | if the index is out of range ( index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 245 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns the element at the specified position in this list as a ByteString.
index | index of the element to return |
IndexOutOfBoundsException | if the index is out of range ( index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 235 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns the element at the specified position in this list as a ByteString.
index | index of the element to return |
IndexOutOfBoundsException | if the index is out of range ( index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 235 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns the element at the specified position in this list as an Object that will either be a String or a ByteString.
index | index of the element to return |
IndexOutOfBoundsException | if the index is out of range ( index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 230 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns the element at the specified position in this list as an Object that will either be a String or a ByteString.
index | index of the element to return |
IndexOutOfBoundsException | if the index is out of range ( index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 230 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns an unmodifiable List of the underlying elements, each of which is either a
or its equivalent UTF-8 encoded
or byte[]. It is an error for the caller to modify the returned List, and attempting to do so will result in an {}.
Implements com.google.protobuf.LazyStringList.
Definition at line 305 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns an unmodifiable List of the underlying elements, each of which is either a
or its equivalent UTF-8 encoded
or byte[]. It is an error for the caller to modify the returned List, and attempting to do so will result in an {}.
Implements com.google.protobuf.LazyStringList.
Definition at line 305 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns an unmodifiable view of the list.
Implements com.google.protobuf.LazyStringList.
Definition at line 411 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Returns an unmodifiable view of the list.
Implements com.google.protobuf.LazyStringList.
Definition at line 411 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Merges all elements from another LazyStringList into this one. This method differs from {} 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.
Definition at line 310 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Merges all elements from another LazyStringList into this one. This method differs from {} 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.
Definition at line 310 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 101 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 101 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 201 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 201 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Replaces the element at the specified position in this list with the specified element (optional operation).
index | index of the element to replace |
element | the element to be stored at the specified position |
UnsupportedOperationException | if the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 265 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Replaces the element at the specified position in this list with the specified element (optional operation).
index | index of the element to replace |
element | the element to be stored at the specified position |
UnsupportedOperationException | if the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 265 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Replaces the element at the specified position in this list with the specified element (optional operation).
index | index of the element to replace |
element | the element to be stored at the specified position |
UnsupportedOperationException | if the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 255 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Replaces the element at the specified position in this list with the specified element (optional operation).
index | index of the element to replace |
element | the element to be stored at the specified position |
UnsupportedOperationException | if the set operation is not supported by this list IndexOutOfBoundsException if the index is out of range (index < 0 || index >=
size()
|
Implements com.google.protobuf.LazyStringList.
Definition at line 255 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 138 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 138 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 269 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 269 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 259 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inlineprivate |
Definition at line 259 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 133 of file protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
inline |
Definition at line 133 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
static |
Definition at line 75 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
staticprivate |
Definition at line 64 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.
|
private |
Definition at line 77 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java.