Structure

Dictionary.Index

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

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.

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

Returns a partial range extending upward from a lower bound.

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

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

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

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

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.

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.

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.

Relationships

Conforms To

See Also

Supporting Types

struct Dictionary.Keys

A view of a dictionary’s keys.

struct Dictionary.Values

A view of a dictionary’s values.

struct DictionaryIterator

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