IdentityCodec<T> class

A Codec that performs the identity conversion (changing nothing) in both directions.

The identity codec passes input directly to output in both directions. This class can be used as a base when combining multiple codecs, because fusing the identity codec with any other codec gives the other codec back.

Note, that when fused with another Codec the identity codec disppears.

Inheritance

Constructors

IdentityCodec()
const

Properties

decoder Converter<T, T>
Returns the decoder of this, converting from T to S. [...]
read-only, override
encoder Converter<T, T>
Returns the encoder from S to T. [...]
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
inverted Codec<T, T>
Inverts this. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

fuse<R>(Codec<T, R> other) Codec<T, R>
Fuse with an other codec. [...]
override
decode(T encoded) → T
Decodes encoded data. [...]
inherited
encode(T input) → T
Encodes input. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited