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

Instance Properties

Instance Methods

Operator Functions

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

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

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

Returns a partial range extending upward from a lower bound.

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

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

Beta
static func ..< (Dictionary<Key, Value>.Index) -> PartialRangeUpTo<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) -> Range<Dictionary<Key, Value>.Index>

Returns a half-open range that contains its lower bound but not its upper bound.

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

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) -> Bool

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) -> Bool

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

Relationships

From Protocol

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>.

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