AnyRangeAsMapCodec<C extends Comparable<C>> class

Encodes an AnyRange as a map with "start" and "end" keys, each holding an encoded Bound.

Unlike the other range codecs, this one round-trips the kind of each bound as well as its value, so it can represent every range shape.

Inheritance

Constructors

AnyRangeAsMapCodec([Codec<C, Object?>? innerCodec])
const

Properties

boundCodec BoundAsMapCodec<C>
Codec used for the AnyRange.startBound and AnyRange.endBound.
no setter
decoder Converter<Map<String, dynamic>, AnyRange<C>>
Returns the decoder of this, converting from T to S.
no setterinherited
encoder Converter<AnyRange<C>, Map<String, dynamic>>
Returns the encoder from S to T.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
innerCodec Codec<C, Object?>?
Codec for the contained values.
finalinherited
inverted Codec<Map<String, dynamic>, AnyRange<C>>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Map<String, dynamic> encoded) AnyRange<C>
Decodes encoded data.
decodeValue(Object? encoded) → C
inherited
encode(AnyRange<C> input) Map<String, dynamic>
Encodes input.
encodeValue(C value) Object?
inherited
fromJson(Map<String, dynamic> json) AnyRange<C>
inherited
fuse<R>(Codec<Map<String, dynamic>, R> other) Codec<AnyRange<C>, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson(AnyRange<C> object) Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited