struct
DictionaryIndex
<
Key
:
Hashable
,
Value
>
Inheritance |
Comparable, Equatable, ForwardIndexType, _Comparable, _ForwardIndexType, _Incrementable
View Protocol Hierarchy →
|
---|---|
Import |
|
Instance Methods
Returns the next consecutive value after self
.
Requires: the next value is representable.
Declaration
func
successor
() -
>
DictionaryIndex
<
Key
,
Value
>
Used to access the key-value pairs in an instance of
Dictionary<Key, Value>
.Dictionary has two subscripting interfaces:
Subscripting with a key, yielding an optional value:
v = d[k]!
Subscripting with an index, yielding a key-value pair:
(k,v) = d[i]