Classes | |
class | BuilderExternalList |
class | MessageExternalList |
class | MessageOrBuilderExternalList |
implements a structure that a protocol message uses to hold a repeated field of other protocol messages. It supports the classical use case of adding immutable Message's to the repeated field and is highly optimized around this (no extra memory allocations and sharing of immutable arrays).
It also supports the additional use case of adding a Message.Builder to the repeated field and deferring conversion of that
to an immutable
. In this way, it's possible to maintain a tree of
's that acts as a fully read/write data structure.
Logically, one can think of a tree of builders as converting the entire tree to messages when build is called on the root or when any method is called that desires a Message instead of a Builder. In terms of the implementation, the
and
classes cache messages that were created so that messages only need to be created when some change occurred in its builder or a builder for one of its descendants.
<MType> | the type of message for the field |
<BType> | the type of builder for the field |
<IType> | the common interface for the message and the builder |
Definition at line 61 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java.