models/version 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
Version<K extends WordField<NativeType>>
4 fields optional, major, minor, fix by default, 1 or 2 bytes each parameterize T to constrain functions of T key to types the Version is defined with
VersionPrototype<K extends WordField<NativeType>>
protype objecct. flexible keys
VersionStandard
standard version with fixed keys and 1 byte fields, for common use. flexible keys and field sizes can be implemented with VersionConstruct.

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

Extensions

EnumMapByName on Map<K, V>
Serialization of Map<Enum, V> interface Methods on loose contraints Map<Enum, V> Enum.name base methods are applicable regardless of EnumMap FixedMap constraints add fills existing Map only
EnumNamedValues on Iterable<MapEntry<K, V>>
Extensions
SerializableKeys on StructForm<K, V>
SerializableMethods on Serializable<Serializable>
SerializableNullableType on StructForm<K, Object?>
SerializableValueObjects on StructForm<K, Object>

Typedefs

FieldMap<K extends Field<V>, V> = Map<K, V>
SerializableEntry<V> = ({SerializableField<V> key, V value})