Class YearAsInt32Codec

  • All Implemented Interfaces:
    Codec<Year>, Decoder<Year>, Encoder<Year>

    public final class YearAsInt32Codec
    extends Object
    implements Codec<Year>

    Encodes and decodes Year values to and from BSON Int32, such as 2018.

    The values are stored as ISO proleptic year integers (see Year.getValue()).

    This type is immutable.