Structure

Dictionary.Index

Used to access the key-value pairs in an instance of Dictionary<Key, Value>.

Overview

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]
    

Topics

Operator Functions

static func !=(Dictionary<Key, Value>.Index, Dictionary<Key, Value>.Index)

Returns a Boolean value indicating whether two values are not equal.

Beta
static func ...(Dictionary<Key, Value>.Index)

Returns a partial range extending upward from a lower bound.

Beta
static func ...(Dictionary<Key, Value>.Index)

Returns a partial range up to, and including, its upper bound.

Beta
static func ..<(Dictionary<Key, Value>.Index)

Returns a partial range up to, but not including, its upper bound.

Beta
static func <=(Dictionary<Key, Value>.Index, Dictionary<Key, Value>.Index)

Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.

Beta
static func >(Dictionary<Key, Value>.Index, Dictionary<Key, Value>.Index)

Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.

Beta
static func >=(Dictionary<Key, Value>.Index, Dictionary<Key, Value>.Index)

Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.

Beta

Relationships

Conforms To

See Also

Supporting Types

struct Dictionary.Keys

A view of a dictionary’s keys.

Beta
struct Dictionary.Values

A view of a dictionary’s values.

Beta
struct DictionaryIterator

An iterator over the members of a Dictionary<Key, Value>.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software