TypeMap<T> class

A type-map associates dart runtime types to an instance of that type.

Annotations
  • @optionalTypeArgs

Constructors

TypeMap()

Properties

hashCode → int
The hash code for this object.
no setterinherited
instances → Iterable<T>
Returns the instances of this map.
no setter
isEmpty → bool
Whether there is nothing in this map.
no setter
isNotEmpty → bool
Whether there is at least one instance in the map.
no setter
length → int
Returns the number of elements in this map.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
types → Iterable<Type>
Returns the types of this map.
no setter

Methods

asMap() → Map<Type, T>
Returns a readonly view onto the underlying map.
getInstance<V extends T>({V ifAbsentPut()?}) → V?
Returns the instance corresponding to the generic type V, or null.
hasInstance<V extends T>() → bool
Tests if the type map has an instance of the generic type V.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setInstance<V extends T>(V value) → void
Sets the instance of the generic type V to value.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited