Package org.bson.codecs
Class IterableCodec
java.lang.Object
org.bson.codecs.IterableCodec
- All Implemented Interfaces:
Codec<Iterable>
,Decoder<Iterable>
,Encoder<Iterable>
,OverridableUuidRepresentationCodec<Iterable>
@Deprecated
public class IterableCodec
extends Object
implements Codec<Iterable>, OverridableUuidRepresentationCodec<Iterable>
Deprecated.
Encodes and decodes
Iterable
objects.- Since:
- 3.3
-
Constructor Summary
ConstructorDescriptionIterableCodec
(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap) Deprecated.Construct a new instance with the givenCodecRegistry
andBsonTypeClassMap
.IterableCodec
(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer) Deprecated.Construct a new instance with the givenCodecRegistry
andBsonTypeClassMap
. -
Method Summary
Modifier and TypeMethodDescriptiondecode
(BsonReader reader, DecoderContext decoderContext) Deprecated.Decodes a BSON value from the given reader into an instance of the type parameterT
.void
encode
(BsonWriter writer, Iterable value, EncoderContext encoderContext) Deprecated.Encode an instance of the type parameterT
into a BSON value.Deprecated.Returns the Class instance that this encodes.withUuidRepresentation
(UuidRepresentation uuidRepresentation) Deprecated.Implementations must return a new instance with theUuidRepresentation
overridden with the given value.
-
Constructor Details
-
IterableCodec
Deprecated.Construct a new instance with the givenCodecRegistry
andBsonTypeClassMap
.- Parameters:
registry
- the non-null codec registrybsonTypeClassMap
- the non-null BsonTypeClassMap
-
IterableCodec
public IterableCodec(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer) Deprecated.Construct a new instance with the givenCodecRegistry
andBsonTypeClassMap
.- Parameters:
registry
- the non-null codec registrybsonTypeClassMap
- the non-null BsonTypeClassMapvalueTransformer
- the value Transformer
-
-
Method Details
-
withUuidRepresentation
Deprecated.Description copied from interface:OverridableUuidRepresentationCodec
Implementations must return a new instance with theUuidRepresentation
overridden with the given value.- Specified by:
withUuidRepresentation
in interfaceOverridableUuidRepresentationCodec<Iterable>
- Parameters:
uuidRepresentation
- the UuidRepresentation- Returns:
- a new instance equivalent to this but with the given UuidRepresentation
-
decode
Deprecated.Description copied from interface:Decoder
Decodes a BSON value from the given reader into an instance of the type parameterT
. -
encode
Deprecated.Description copied from interface:Encoder
Encode an instance of the type parameterT
into a BSON value. -
getEncoderClass
Deprecated.Description copied from interface:Encoder
Returns the Class instance that this encodes. This is necessary because Java does not reify generic types.- Specified by:
getEncoderClass
in interfaceEncoder<Iterable>
- Returns:
- the Class instance that this encodes.
-
CollectionCodecProvider