Dictionaries
These are some Dictionary
shaped structures.
-
Interface for Dictionary-like structures.
See moreDeclaration
Swift
public protocol DictionaryProtocol : Collection
-
Ordered Dictionary.
See moreDeclaration
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
See morekeys
.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
See moreKey
toValue
as well as fromValue
toKey
.Declaration
Swift
public struct Bimap<Key, Value> : Hashable where Key : Hashable, Value : Hashable
extension Bimap: DictionaryProtocol
extension Bimap: CollectionWrapping
extension Bimap: ExpressibleByDictionaryLiteral