Constructor | Description |
---|---|
IterableCodec(CodecRegistry registry,
BsonTypeClassMap bsonTypeClassMap) |
Construct a new instance with the given
CodecRegistry and BsonTypeClassMap . |
IterableCodec(CodecRegistry registry,
BsonTypeClassMap bsonTypeClassMap,
Transformer valueTransformer) |
Construct a new instance with the given
CodecRegistry and BsonTypeClassMap . |
Modifier and Type | Method | Description |
---|---|---|
Iterable |
decode(BsonReader reader,
DecoderContext decoderContext) |
Decodes a BSON value from the given reader into an instance of the type parameter
T . |
void |
encode(BsonWriter writer,
Iterable value,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
Class<Iterable> |
getEncoderClass() |
Returns the Class instance that this encodes.
|
public IterableCodec(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap)
CodecRegistry
and BsonTypeClassMap
.registry
- the non-null codec registrybsonTypeClassMap
- the non-null BsonTypeClassMappublic IterableCodec(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer)
CodecRegistry
and BsonTypeClassMap
.registry
- the non-null codec registrybsonTypeClassMap
- the non-null BsonTypeClassMapvalueTransformer
- the value Transformerpublic Iterable decode(BsonReader reader, DecoderContext decoderContext)
Decoder
T
.public void encode(BsonWriter writer, Iterable value, EncoderContext encoderContext)
Encoder
T
into a BSON value.public Class<Iterable> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<Iterable>