Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:core
  3. MapEntry<K,V> class
MapEntry
description

MapEntry<K,V> classfinal

A key/value pair representing an entry in aMap.

TheMap interface contains various methods that caninspect or modify the map based on entry objects.

final map = {'1': 'A', '2': 'B'};map.addEntries([ MapEntry('3', 'C'), MapEntry('4', 'D'),]);print(map); // {1: A, 2: B, 3: C, 4: D}

Do not extend or implement theMapEntry class.If the Dart language introduces value types,theMapEntry class will be changed to such a type,and will likely no longer be able to be implemented or extendedby classes.

Constructors

MapEntry(Kkey,Vvalue)
Creates an entry withkey andvalue.
const
factory

Properties

hashCodeint
The hash code for this object.
no setterinherited
key→ K
The key of the entry.
final
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited
value→ V
The value associated tokey in a map.
final

Methods

noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString()String
String representation intended for debugging only.
override

Operators

operator ==(Objectother)bool
The equality operator.
inherited
  1. Dart
  2. dart:core
  3. MapEntry<K,V> class
dart:core library

[8]ページ先頭

©2009-2025 Movatter.jp