Package io.protostuff
Class MessageCollectionSchema<V>
java.lang.Object
io.protostuff.CollectionSchema<V>
io.protostuff.MessageCollectionSchema<V>
- All Implemented Interfaces:
Schema<Collection<V>>
A schema for a
Collection
with Message
or pojo values. Does not allow null values.-
Nested Class Summary
Nested classes/interfaces inherited from class io.protostuff.CollectionSchema
CollectionSchema.MessageFactories, CollectionSchema.MessageFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Pipe.Schema
<V> The pipe schema of the member (message).The schema of the member (message).Fields inherited from class io.protostuff.CollectionSchema
FIELD_NAME_NULL, FIELD_NAME_VALUE, MESSAGE_FACTORIES_NAMES, messageFactory, preserveNull
-
Constructor Summary
ConstructorsConstructorDescriptionMessageCollectionSchema
(Schema<V> schema, boolean preserveNull) MessageCollectionSchema
(Schema<V> schema, Pipe.Schema<V> pipeSchema, boolean preserveNull) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addValueFrom
(Input input, Collection<V> collection) Adds the value from the input into theCollection
.protected void
transferValue
(Pipe pipe, Input input, Output output, int number, boolean repeated) Transfers the value from the input to the output.protected void
writeValueTo
(Output output, int fieldNumber, V value, boolean repeated) Writes the value to the output.Methods inherited from class io.protostuff.CollectionSchema
fieldName, fieldNumber, getFieldName, getFieldNumber, isInitialized, mergeFrom, messageFullName, messageName, newMessage, typeClass, writeTo
-
Field Details
-
schema
The schema of the member (message). -
pipeSchema
The pipe schema of the member (message).
-
-
Constructor Details
-
MessageCollectionSchema
-
MessageCollectionSchema
-
-
Method Details
-
addValueFrom
Description copied from class:CollectionSchema
Adds the value from the input into theCollection
.- Specified by:
addValueFrom
in classCollectionSchema<V>
- Throws:
IOException
-
writeValueTo
protected void writeValueTo(Output output, int fieldNumber, V value, boolean repeated) throws IOException Description copied from class:CollectionSchema
Writes the value to the output.- Specified by:
writeValueTo
in classCollectionSchema<V>
- Throws:
IOException
-
transferValue
protected void transferValue(Pipe pipe, Input input, Output output, int number, boolean repeated) throws IOException Description copied from class:CollectionSchema
Transfers the value from the input to the output.- Specified by:
transferValue
in classCollectionSchema<V>
- Throws:
IOException
-