general/serializable
library
Classes
-
FixedMap<K, V>
-
FixedMap - interface for Map constraints
FixedMap - fixed set of keys
optimized for small fixed set of keys
guarantees all keys are present
can guarantee non null return - if V is defined as non nullable
-
IndexMap<K extends dynamic, V>
-
IndexMap
Default implementation using parallel arrays
-
SerializableField<V>
-
SerializableField<V>/
NamedField
a key to each field, an type parameter, with an generated string, use as json key;
effectively describe the memory allocation requirements
maps entirety of the struct
Mixins
-
Immutable<S extends Immutable<S>>
-
optional
-
Serializable<S extends Serializable<S>>
-
Serializable -
mixin in 1 step for serialization
provide toMap or implements MapBase and duplicate code until combine mixin is support
mixin toMap
implmenting Map would require subclasses to mixin MapBase
Extension Types
-
EnumMap
-
EnumMap
A Map with the additional constraint that Keys are a
fixed set, via Enum.
creation implements FixedMap/IndexMap constraints
factory constructors build IndexMap by default
wrap String handling via .name around IndexMap.
Adds Serialization using Enum.name to a Map,
Keys inherit from Enum -
index via Enum.index -> create a parallel array map by default
String name via Enum.name -> directly use for serialization
-
EnumMapFactory
-
construct a Map<K extends Enum, V> from Map<String, V>
on creation ensure all fields are valid