TraitMap class
Methods
-
addAll(Map<ShapeId, Trait<Object>> other)
→ void
-
Adds all key/value pairs of
other
to this map.
inherited
-
addEntries(Iterable<MapEntry<ShapeId, Trait<Object>>> entries)
→ void
-
Adds all key/value pairs of
newEntries
to this map.
inherited
-
cast<K2, V2>()
→ Map<K2, V2>
-
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
-
expectTrait<T extends Trait<Object>>()
→ T
-
Gets the trait of type
T
from the shape or throws if not found.
-
forEach(void f(ShapeId, Trait<Object>))
→ void
-
Applies
action
to each key/value pair of the map.
inherited
-
getTrait<T extends Trait<Object>>()
→ T?
-
Returns the trait of type
T
, if it exists on the shape.
-
hasTrait<T extends Trait<Object>>()
→ bool
-
Whether the shape has a trait of type
T
.
-
map<K2, V2>(MapEntry<K2, V2> transform(ShapeId, Trait<Object>))
→ 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(ShapeId key, Trait<Object> ifAbsent())
→ Trait<Object>
-
Look up the value of
key
, or add a new entry if it isn't there.
inherited
-
remove(Object? key)
→ Trait<Object>?
-
Removes
key
and its associated value, if present, from the map.
inherited
-
removeWhere(bool test(ShapeId, Trait<Object>))
→ void
-
Removes all entries of this map that satisfy the given
test
.
inherited
-
retype<K2, V2>()
→ Map<K2, V2>
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
update(ShapeId key, Trait<Object> update(Trait<Object>), {Trait<Object> ifAbsent()?})
→ Trait<Object>
-
Updates the value for the provided
key
.
inherited
-
updateAll(Trait<Object> update(ShapeId, Trait<Object>))
→ void
-
Updates all values.
inherited