struct Dictionary.Index

The position of a key-value pair in a dictionary.

Dictionary has two subscripting interfaces:

  1. Subscripting with a key, yielding an optional value:

    v = d[k]!

  2. Subscripting with an index, yielding a key-value pair:

    (k, v) = d[i]

Inheritance Comparable, Equatable, Hashable View Protocol Hierarchy →
Import import Swift

Instance Variables

var hashValue: Int

The hash value.

Hash values are not guaranteed to be equal across different executions of your program. Do not save hash values to use during a future execution.


var hashValue: Int { get }