Maps
Last updated
Was this helpful?
Last updated
Was this helpful?
Maps are collections of key value pairs, similar to dicts in Python or Hashes in Ruby. Keys in a map are unique, and any value can be retrieved based upon a key.Values in a map do not have to be unique, however. Maps have methods to return a collection containing keys or values.
Maps are immutable by default but can mutable using the scala.collection.mutable.Map class. Mutable maps can then be appended to or updated.