|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.dyuproject.protostuff.CollectionSchema<V>
public abstract class CollectionSchema<V>
A schema for standard jdk collections.
Null values are not serialized/written.
If your application relies on Object.equals(Object), it will fail when a
serialized collection contains null values (The deserialized collection will not
contained the null value). MapSchema on the otherhand can contain both
null keys and null values and still succeeding on Object.equals(Object).
| Nested Class Summary | |
|---|---|
static class |
CollectionSchema.MessageFactories
|
static interface |
CollectionSchema.MessageFactory
Creates new Collection messages. |
| Field Summary | |
|---|---|
static java.lang.String |
FIELD_NAME_VALUE
|
CollectionSchema.MessageFactory |
messageFactory
Factory for creating Collection messages. |
Pipe.Schema<java.util.Collection<V>> |
pipeSchema
|
| Constructor Summary | |
|---|---|
CollectionSchema()
|
|
CollectionSchema(CollectionSchema.MessageFactory messageFactory)
|
|
| Method Summary | |
|---|---|
protected abstract void |
addValueFrom(Input input,
java.util.Collection<V> collection)
Adds the value from the input into the Collection. |
java.lang.String |
getFieldName(int number)
|
int |
getFieldNumber(java.lang.String name)
|
boolean |
isInitialized(java.util.Collection<V> map)
|
void |
mergeFrom(Input input,
java.util.Collection<V> message)
|
java.lang.String |
messageFullName()
|
java.lang.String |
messageName()
|
java.util.Collection<V> |
newMessage()
|
protected abstract void |
transferValue(Pipe pipe,
Input input,
Output output,
int number,
boolean repeated)
Transfers the value from the input to the output. |
java.lang.Class<? super java.util.Collection<V>> |
typeClass()
|
void |
writeTo(Output output,
java.util.Collection<V> message)
|
protected abstract void |
writeValueTo(Output output,
int fieldNumber,
V value,
boolean repeated)
Writes the value to the output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FIELD_NAME_VALUE
public final CollectionSchema.MessageFactory messageFactory
Collection messages.
public final Pipe.Schema<java.util.Collection<V>> pipeSchema
| Constructor Detail |
|---|
public CollectionSchema()
public CollectionSchema(CollectionSchema.MessageFactory messageFactory)
| Method Detail |
|---|
protected abstract void addValueFrom(Input input,
java.util.Collection<V> collection)
throws java.io.IOException
Collection.
java.io.IOException
protected abstract void writeValueTo(Output output,
int fieldNumber,
V value,
boolean repeated)
throws java.io.IOException
java.io.IOException
protected abstract void transferValue(Pipe pipe,
Input input,
Output output,
int number,
boolean repeated)
throws java.io.IOException
java.io.IOExceptionpublic final java.lang.String getFieldName(int number)
getFieldName in interface Schema<java.util.Collection<V>>public final int getFieldNumber(java.lang.String name)
getFieldNumber in interface Schema<java.util.Collection<V>>public final boolean isInitialized(java.util.Collection<V> map)
isInitialized in interface Schema<java.util.Collection<V>>public final java.lang.String messageFullName()
messageFullName in interface Schema<java.util.Collection<V>>public final java.lang.String messageName()
messageName in interface Schema<java.util.Collection<V>>public final java.lang.Class<? super java.util.Collection<V>> typeClass()
typeClass in interface Schema<java.util.Collection<V>>public final java.util.Collection<V> newMessage()
newMessage in interface Schema<java.util.Collection<V>>
public void mergeFrom(Input input,
java.util.Collection<V> message)
throws java.io.IOException
mergeFrom in interface Schema<java.util.Collection<V>>java.io.IOException
public void writeTo(Output output,
java.util.Collection<V> message)
throws java.io.IOException
writeTo in interface Schema<java.util.Collection<V>>java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||