mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
1.9 KiB
1.9 KiB
OrderedCollections/OrderedDictionary
Topics
Creating a Dictionary
init()init(minimumCapacity:persistent:)init(uniqueKeysWithValues:)-5ux9rinit(uniqueKeysWithValues:)-88mziinit(uncheckedUniqueKeysWithValues:)-6gxhjinit(uncheckedUniqueKeysWithValues:)-2j0dwinit(uncheckedUniqueKeysWithValues:)-6gxhjinit(uniqueKeys:values:)init(uncheckedUniqueKeys:values:)init(_:uniquingKeysWith:)-2y39binit(_:uniquingKeysWith:)-zhfpinit(grouping:by:)-6mahwinit(grouping:by:)-6m2zw
Inspecting a Dictionary
isEmptycount
Accessing Keys and Values
subscript(_:)subscript(_:default:)index(forKey:)
Collection Views
keysvalues-swift.propertyelements-swift.property
Updating Values
updateValue(_:forKey:)updateValue(_:forKey:insertingAt:)updateValue(forKey:default:with:)updateValue(forKey:insertingDefault:at:with:)
Removing Keys and Values
removeValue(forKey:)remove(at:)filter(_:)removeAll(where:)removeAll(keepingCapacity:)removeFirst()removeLast()removeFirst(_:)removeLast(_:)removeSubrange(_:)-512n3removeSubrange(_:)-8rmzx
Combining Dictionaries
merge(_:uniquingKeysWith:)-6ka2imerge(_:uniquingKeysWith:)-9wkadmerging(_:uniquingKeysWith:)-4z49cmerging(_:uniquingKeysWith:)-2e0xa
Comparing Dictionaries
==(_:_:)
Reordering Elements
swapAt(_:_:)reverse()sort()sort(by:)reverse()shuffle()shuffle(using:)partition(by:)moveSubrange(_:to:)move(keys:to:)move(indices:to:)
Transforming a Dictionary
mapValues(_:)compactMapValues(_:)
Memory Management
reserveCapacity(_:)
Supporting Types
IndexValues-swift.structElements-swift.struct