Class MonthDayAsDocumentCodec

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

    public final class MonthDayAsDocumentCodec
    extends Object
    implements Codec<MonthDay>

    Encodes and decodes MonthDay values to and from BSON Document, such as { month: 1, day: 2 }.

    The values are stored using the following structure:

    • month (a non-null Int32);
    • day (a non-null Int32).

    This type is immutable.