Pair<K, V> class

Represents an immutable key-value pair.

Implemented types
Mixed-in types
Annotations
  • @immutable

Constructors

Pair(K key, V value)
Creates a Pair with the given key and value.

Properties

fields List
The fields in this Pair.
final
hashCode int
The hash code for this object.
no setterinherited
key → K
The key.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → V
The value.
final

Methods

map<K1, V1>(Mapper<K, K1> key, Mapper<V, V1> value) Pair<K1, V1>
Creates a Pair which key and value has been mapped using key and value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce<T>(T reduce(K, V)) → T
Reduces key and value using reduce.
replace({K? key, V? value}) Pair<K, V>
Creates a Pair which key and/or value has been replaced.
toString() String
A string representation of this object.
inherited

Operators

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