public class IterableCodec extends java.lang.Object implements Codec<java.lang.Iterable>, OverridableUuidRepresentationCodec<java.lang.Iterable>
Iterable objects.| Constructor and 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 and Description |
|---|---|
java.lang.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,
java.lang.Iterable value,
EncoderContext encoderContext)
Encode an instance of the type parameter
T into a BSON value. |
java.lang.Class<java.lang.Iterable> |
getEncoderClass()
Returns the Class instance that this encodes.
|
Codec<java.lang.Iterable> |
withUuidRepresentation(UuidRepresentation uuidRepresentation)
Implementations must return a new instance with the
UuidRepresentation overridden with the given value. |
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 Codec<java.lang.Iterable> withUuidRepresentation(UuidRepresentation uuidRepresentation)
OverridableUuidRepresentationCodecUuidRepresentation overridden with the given value.withUuidRepresentation in interface OverridableUuidRepresentationCodec<java.lang.Iterable>uuidRepresentation - the UuidRepresentationpublic java.lang.Iterable decode(BsonReader reader, DecoderContext decoderContext)
DecoderT.public void encode(BsonWriter writer, java.lang.Iterable value, EncoderContext encoderContext)
EncoderT into a BSON value.public java.lang.Class<java.lang.Iterable> getEncoderClass()
EncodergetEncoderClass in interface Encoder<java.lang.Iterable>Copyright © 2010 - 2023 Adobe. All Rights Reserved