Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:collection
  3. MapView<K,V> class
MapView
description

MapView<K,V> class

Wrapper around a class that implementsMap that only exposesMapmembers.

A simple wrapper that delegates allMap members to the map provided in theconstructor.

Base for delegating map implementations likeUnmodifiableMapView.

Implemented types
Implementers

Constructors

MapView(Map<K,V>map)
Creates a view which forwards operations tomap.
const

Properties

entriesIterable<MapEntry<K,V>>
The map entries of thisMap.
no setteroverride
hashCodeint
The hash code for this object.
no setterinherited
isEmptybool
Whether there is no key/value pair in the map.
no setteroverride
isNotEmptybool
Whether there is at least one key/value pair in the map.
no setteroverride
keysIterable<K>
The keys of thisMap.
no setteroverride
lengthint
The number of key/value pairs in the map.
no setteroverride
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited
valuesIterable<V>
The values of thisMap.
no setteroverride

Methods

addAll(Map<K,V>other)→ void
Adds all key/value pairs ofother to this map.
override
addEntries(Iterable<MapEntry<K,V>>entries)→ void
Adds all key/value pairs ofnewEntries to this map.
override
cast<RK,RV>()Map<RK,RV>
Provides a view of this map as havingRK keys andRV instances,if necessary.
override
clear()→ void
Removes all entries from the map.
override
containsKey(Object?key)bool
Whether this map contains the givenkey.
override
containsValue(Object?value)bool
Whether this map contains the givenvalue.
override
forEach(voidaction(Kkey,Vvalue))→ void
Appliesaction to each key/value pair of the map.
override
map<K2,V2>(MapEntry<K2,V2>transform(Kkey,Vvalue))Map<K2,V2>
Returns a new map where all entries of this map are transformed bythe givenconvert function.
override
noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putIfAbsent(Kkey,VifAbsent())→ V
Look up the value ofkey, or add a new entry if it isn't there.
override
remove(Object?key)→ V?
Removeskey and its associated value, if present, from the map.
override
removeWhere(booltest(Kkey,Vvalue))→ void
Removes all entries of this map that satisfy the giventest.
override
toString()String
A string representation of this object.
override
update(Kkey,Vupdate(Vvalue), {VifAbsent()?})→ V
Updates the value for the providedkey.
override
updateAll(Vupdate(Kkey,Vvalue))→ void
Updates all values.
override

Operators

operator ==(Objectother)bool
The equality operator.
inherited
operator [](Object?key)→ V?
The value for the givenkey, ornull ifkey is not in the map.
override
operator []=(Kkey,Vvalue)→ void
Associates thekey with the givenvalue.
override
  1. Dart
  2. dart:collection
  3. MapView<K,V> class
dart:collection library

[8]ページ先頭

©2009-2025 Movatter.jp