Version<K extends WordField<NativeType>> class abstract base

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

Inheritance
Implementers

Constructors

Version(int optional, int major, int minor, int fix, {String? name})
factory
Version.char8(int optional, int major, int minor, int fix)
const
Version.char16(int optional, int major, int minor, int fix)
const
Version.value(int value)
const
Version.withData(WordStruct<K> word)
const
Version.withType(List<K> keys, {int value, String? name})
const
factory

Properties

bits Bits
no setter
byteLength int
no setter
data StructData<K, int>
Proxy to allow the same keys Object as Structure<K, V> data passed to Keys
no setterinherited
entries Iterable<MapEntry<K, int>>
The map entries of this Map.
no setterinherited
fields Iterable<StructField<K, int>>
no setterinherited
fix int
order by default, size determined by key type, T.
no setter
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Whether there is no key/value pair in the map.
no setterinherited
isNotEmpty bool
Whether there is at least one key/value pair in the map.
no setterinherited
keys List<K>
The keys of this Map.
no setteroverride
labelPair → (String, String)
no setter
length int
The number of key/value pairs in the map.
no setterinherited
major int
no setter
minor int
no setter
name String?
no setter
numbers List<int>
alias
no setter
optional int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<int>
no setterinherited
word WordStruct<K>
finalinherited

Methods

addAll(Map<K, int> other) → void
Adds all key/value pairs of other to this map.
inherited
addEntries(Iterable<MapEntry<K, int>> newEntries) → void
Adds all key/value pairs of newEntries to this map.
inherited
cast<RK, RV>() Map<RK, RV>
Provides a view of this map as having RK keys and RV instances, if necessary.
inherited
clear() → void
Removes all entries from the map.
inherited
containsKey(Object? key) bool
Whether this map contains the given key.
inherited
containsValue(Object? value) bool
Whether this map contains the given value.
inherited
copyWithData(WordStruct<K> word) Version<K>
inherited
field(K key) StructField<K, int>
inherited
fieldAs<R>(Field<R> key) StructField<Field<R>, R>
inherited
fieldOrNull(K key) int?
inherited
forEach(void action(K key, int value)) → void
Applies action to each key/value pair of the map.
inherited
map<K2, V2>(MapEntry<K2, V2> transform(K key, int value)) Map<K2, V2>
Returns a new map where all entries of this map are transformed by the given convert function.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putIfAbsent(K key, int ifAbsent()) int
Look up the value of key, or add a new entry if it isn't there.
inherited
remove(covariant K key) int
Removes key and its associated value, if present, from the map.
inherited
removeWhere(bool test(K key, int value)) → void
Removes all entries of this map that satisfy the given test.
inherited
toJson() Map<String, Object>
Json pass keys or alternatively implement in List<K> keys extension
toJsonAsEntry() MapEntry<String, Object>
toJsonVerbose() Map<String, Object>
toMap() Map<K, int>
Snapshot as an IndexMap. If K extends Enum, call .toJson() on the result to serialise via EnumMapByName.
inherited
toMapEntryByName() MapEntry<String, int>
toString() String
A string representation of this object.
override
toStringAsVersion([String left = '', String right = '', String separator = '.']) String
msb first with dot separator optional.major.minor.fix
toStringAsVersionEntry([String left = '', String right = '', String separator = '.']) MapEntry<String, String>
trySetField(K key, int value) bool
inherited
update(K key, int update(int value), {int ifAbsent()?}) int
Updates the value for the provided key.
inherited
updateAll(int update(K key, int value)) → void
Updates all values.
inherited
withField(K key, int value) Version<K>
inherited
withFields(Iterable<StructField<K, int>> fields) Version<K>
inherited
withMap(Map<K, int> map) Version<K>
inherited

Operators

operator <(Version<WordField<NativeType>> other) bool
operator <=(Version<WordField<NativeType>> other) bool
operator ==(covariant Version<K> other) bool
The equality operator.
override
operator >(Version<WordField<NativeType>> other) bool
operator >=(Version<WordField<NativeType>> other) bool
operator [](covariant K key) int
inherited
operator []=(covariant K key, int value) → void
inherited