Dictionaries

These are some Dictionary shaped structures.

  • Interface for Dictionary-like structures.

    See more

    Declaration

    Swift

    public protocol DictionaryProtocol : Collection
  • Ordered Dictionary.

    See more

    Declaration

    Swift

    public struct OrderedDictionary<Key, Value> : DictionaryProtocol where Key : Hashable
    extension OrderedDictionary: Collection
    extension OrderedDictionary: ExpressibleByDictionaryLiteral
    extension OrderedDictionary: Equatable where Value: Equatable
    extension OrderedDictionary: Hashable where Value: Hashable
  • Ordered dictionary which has sorted keys.

    See more

    Declaration

    Swift

    public struct SortedDictionary<Key, Value> : DictionaryProtocol where Key : Comparable, Key : Hashable
    extension SortedDictionary: Collection
    extension SortedDictionary: BidirectionalCollection
    extension SortedDictionary: RandomAccessCollection
    extension SortedDictionary: ExpressibleByDictionaryLiteral
    extension SortedDictionary: Zero
    extension SortedDictionary: Equatable where Value: Equatable
    extension SortedDictionary: Hashable where Value: Hashable
  • Dictionary-like structure which allows O(1) access from Key to Value as well as from Value to Key.

    See more

    Declaration

    Swift

    public struct Bimap<Key, Value> : Hashable where Key : Hashable, Value : Hashable
    extension Bimap: DictionaryProtocol
    extension Bimap: CollectionWrapping
    extension Bimap: ExpressibleByDictionaryLiteral