This type is immutable and uses structural
equality. Add/remove operations return a new map.
Syntax
public sealed class Map
: CollectionValue>
Constructors
The following entries describe some of the constructors of this type. Several more
are described in the library documentation.
Map()
Default constructor. The static field Map.EmptyMap is preferred and should
be used instead of this constructor.
Map(T,S)
Creates a map from the key and value given as arguments.
Map(IEnumerable>)
Creates a map from pairs of keys and values.
Map(Pair[])
Creates a map with a params array of key/value pairs.
etc. . . .
Appendices 297
Methods
The following entries describe some of the methods of this type. Many more are
described in the library documentation.
Add(T, S)
Produces a map that contains all the key/value pairs of the current map, plus the
given key/value pair.
Add(Pair)
Produces a map that contains all the key/value pairs of the current map, plus the
given key/value pair.
Contains(Pair)
Tests whether the given key/value pair is found in the current map. See
ContainsKey(T) instead if you want to check if a given key is in the map.
ContainsKey(T)
Returns true if the map contains the given key, false otherwise.
Difference(Map)
Map difference. Returns all of the key/value pairs in the current map that are
not found in the map given as the argument.
Pages:
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385