From bfb92e439b0cfaa53d08bd10c74043de51fa540e Mon Sep 17 00:00:00 2001 From: Joseph Duffy Date: Wed, 19 Oct 2022 20:27:28 +0100 Subject: [PATCH] Generate result builders via Sourcery --- Package.resolved | 124 ++ Package.swift | 3 + Sources/HashableByKeyPath/.sourcery.yml | 7 + .../EquatableKeyPathCollectionBuilder.swift | 1418 ----------------- ...quatableKeyPathCollectionBuilder.swift.gyb | 101 -- .../HashableKeyPathCollectionBuilder.swift | 1418 ----------------- ...HashableKeyPathCollectionBuilder.swift.gyb | 101 -- .../ResultBuilderAPI/Input/Empty.swift | 1 + ...leKeyPathCollectionBuilder.generated.swift | 697 ++++++++ ...leKeyPathCollectionBuilder.generated.swift | 696 ++++++++ .../EquatableKeyPathCollectionBuilder.stencil | 40 + .../HashableKeyPathCollectionBuilder.stencil | 37 + 12 files changed, 1605 insertions(+), 3038 deletions(-) create mode 100644 Package.resolved create mode 100644 Sources/HashableByKeyPath/.sourcery.yml delete mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift delete mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift.gyb delete mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift delete mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift.gyb create mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/Input/Empty.swift create mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/Output/EquatableKeyPathCollectionBuilder.generated.swift create mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/Output/HashableKeyPathCollectionBuilder.generated.swift create mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/Templates/EquatableKeyPathCollectionBuilder.stencil create mode 100644 Sources/HashableByKeyPath/ResultBuilderAPI/Templates/HashableKeyPathCollectionBuilder.stencil diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..dc46010 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,124 @@ +{ + "object": { + "pins": [ + { + "package": "AEXML", + "repositoryURL": "https://github.com/tadija/AEXML.git", + "state": { + "branch": null, + "revision": "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", + "version": "4.6.1" + } + }, + { + "package": "Commander", + "repositoryURL": "https://github.com/kylef/Commander.git", + "state": { + "branch": null, + "revision": "4b6133c3071d521489a80c38fb92d7983f19d438", + "version": "0.9.1" + } + }, + { + "package": "Komondor", + "repositoryURL": "https://github.com/shibapm/Komondor.git", + "state": { + "branch": null, + "revision": "90b087b1e39069684b1ff4bf915c2aae594f2d60", + "version": "1.1.3" + } + }, + { + "package": "PackageConfig", + "repositoryURL": "https://github.com/shibapm/PackageConfig.git", + "state": { + "branch": null, + "revision": "58523193c26fb821ed1720dcd8a21009055c7cdb", + "version": "1.1.3" + } + }, + { + "package": "PathKit", + "repositoryURL": "https://github.com/kylef/PathKit.git", + "state": { + "branch": null, + "revision": "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", + "version": "1.0.1" + } + }, + { + "package": "ShellOut", + "repositoryURL": "https://github.com/JohnSundell/ShellOut.git", + "state": { + "branch": null, + "revision": "e1577acf2b6e90086d01a6d5e2b8efdaae033568", + "version": "2.3.0" + } + }, + { + "package": "Sourcery", + "repositoryURL": "https://github.com/krzysztofzablocki/Sourcery.git", + "state": { + "branch": null, + "revision": "8aab07cbda5206a2625ff9736c065262d2804364", + "version": null + } + }, + { + "package": "Spectre", + "repositoryURL": "https://github.com/kylef/Spectre.git", + "state": { + "branch": null, + "revision": "26cc5e9ae0947092c7139ef7ba612e34646086c7", + "version": "0.10.1" + } + }, + { + "package": "Stencil", + "repositoryURL": "https://github.com/stencilproject/Stencil.git", + "state": { + "branch": null, + "revision": "4f222ac85d673f35df29962fc4c36ccfdaf9da5b", + "version": "0.15.1" + } + }, + { + "package": "StencilSwiftKit", + "repositoryURL": "https://github.com/SwiftGen/StencilSwiftKit.git", + "state": { + "branch": null, + "revision": "20e2de5322c83df005939d9d9300fab130b49f97", + "version": "2.10.1" + } + }, + { + "package": "SwiftSyntax", + "repositoryURL": "https://github.com/apple/swift-syntax.git", + "state": { + "branch": null, + "revision": "093e5ee151d206454e2c1950d81333c4d4a4472e", + "version": null + } + }, + { + "package": "XcodeProj", + "repositoryURL": "https://github.com/tuist/XcodeProj.git", + "state": { + "branch": null, + "revision": "446f3a0db73e141c7f57e26fcdb043096b1db52c", + "version": "8.3.1" + } + }, + { + "package": "Yams", + "repositoryURL": "https://github.com/jpsim/Yams.git", + "state": { + "branch": null, + "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", + "version": "4.0.6" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index 3a13f87..a88816d 100644 --- a/Package.swift +++ b/Package.swift @@ -6,6 +6,9 @@ let package = Package( products: [ .library(name: "HashableByKeyPath", targets: ["HashableByKeyPath"]), ], + dependencies: [ + .package(url: "https://github.com/krzysztofzablocki/Sourcery.git", .revision("8aab07cbda5206a2625ff9736c065262d2804364")), + ], targets: [ .target(name: "HashableByKeyPath"), .testTarget(name: "HashableByKeyPathTests", dependencies: ["HashableByKeyPath"]), diff --git a/Sources/HashableByKeyPath/.sourcery.yml b/Sources/HashableByKeyPath/.sourcery.yml new file mode 100644 index 0000000..ddb0f4e --- /dev/null +++ b/Sources/HashableByKeyPath/.sourcery.yml @@ -0,0 +1,7 @@ +sources: + - ResultBuilderAPI/Input/ +templates: + - ResultBuilderAPI/Templates/ +output: ResultBuilderAPI/Output/ +args: + maxArgumentCount: 16 diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift b/Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift deleted file mode 100644 index 0eeb9d2..0000000 --- a/Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift +++ /dev/null @@ -1,1418 +0,0 @@ -// This file is generated. Do not edit it. -#if swift(>=5.4) -/// A result builder used to build `EquatableKeyPathCollection` values. -@resultBuilder -public final class EquatableKeyPathCollectionBuilder { - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable - >( - _ keyPathA: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathN: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable, - ValueN: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - collection.addEquatableKeyPath(keyPathN) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathN: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathO: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable, - ValueN: Equatable, - ValueO: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - collection.addEquatableKeyPath(keyPathN) - collection.addEquatableKeyPath(keyPathO) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathN: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathO: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathP: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable, - ValueN: Equatable, - ValueO: Equatable, - ValueP: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath, - _ keyPathP: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - collection.addEquatableKeyPath(keyPathN) - collection.addEquatableKeyPath(keyPathO) - collection.addEquatableKeyPath(keyPathP) - return collection - } -} -#elseif swift(>=5.1) -/// A function builder used to build `EquatableKeyPathCollection` values. -@_functionBuilder -public final class EquatableKeyPathCollectionBuilder { - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable - >( - _ keyPathA: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathN: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable, - ValueN: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - collection.addEquatableKeyPath(keyPathN) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathN: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathO: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable, - ValueN: Equatable, - ValueO: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - collection.addEquatableKeyPath(keyPathN) - collection.addEquatableKeyPath(keyPathO) - return collection - } - - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathB: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathC: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathD: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathE: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathF: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathG: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathH: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathI: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathJ: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathK: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathL: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathM: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathN: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathO: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - parameter keyPathP: An `Equatable` key path to add to the `EquatableKeyPathCollection`. - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< - ValueA: Equatable, - ValueB: Equatable, - ValueC: Equatable, - ValueD: Equatable, - ValueE: Equatable, - ValueF: Equatable, - ValueG: Equatable, - ValueH: Equatable, - ValueI: Equatable, - ValueJ: Equatable, - ValueK: Equatable, - ValueL: Equatable, - ValueM: Equatable, - ValueN: Equatable, - ValueO: Equatable, - ValueP: Equatable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath, - _ keyPathP: KeyPath - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() - collection.addEquatableKeyPath(keyPathA) - collection.addEquatableKeyPath(keyPathB) - collection.addEquatableKeyPath(keyPathC) - collection.addEquatableKeyPath(keyPathD) - collection.addEquatableKeyPath(keyPathE) - collection.addEquatableKeyPath(keyPathF) - collection.addEquatableKeyPath(keyPathG) - collection.addEquatableKeyPath(keyPathH) - collection.addEquatableKeyPath(keyPathI) - collection.addEquatableKeyPath(keyPathJ) - collection.addEquatableKeyPath(keyPathK) - collection.addEquatableKeyPath(keyPathL) - collection.addEquatableKeyPath(keyPathM) - collection.addEquatableKeyPath(keyPathN) - collection.addEquatableKeyPath(keyPathO) - collection.addEquatableKeyPath(keyPathP) - return collection - } -} -#endif diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift.gyb b/Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift.gyb deleted file mode 100644 index 4a66fa3..0000000 --- a/Sources/HashableByKeyPath/ResultBuilderAPI/EquatableKeyPathCollectionBuilder.swift.gyb +++ /dev/null @@ -1,101 +0,0 @@ -% import string -// This file is generated. Do not edit it. -#if swift(>=5.4) -/// A result builder used to build `EquatableKeyPathCollection` values. -@resultBuilder -public final class EquatableKeyPathCollectionBuilder { -% # 16 is arbitrary, but there has to be a limit somewhere -% parameterCountList = range(16) -% for parameterCount in parameterCountList: -% parametersRange = range(parameterCount + 1) - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] - /// - parameter keyPath${character}: An `Equatable` key path to add to the `EquatableKeyPathCollection`. -% end - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] -% if isLast: - Value${character}: Equatable -% else: - Value${character}: Equatable, -% end -% end - >( -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] -% isLast = characterIndex == parametersRange[-1] -% if isLast: - _ keyPath${character}: KeyPath -% else: - _ keyPath${character}: KeyPath, -% end -% end - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] - collection.addEquatableKeyPath(keyPath${character}) -% end - return collection - } -% if parameterCount != parameterCountList[-1]: - -% end -% end -} -#elseif swift(>=5.1) -/// A function builder used to build `EquatableKeyPathCollection` values. -@_functionBuilder -public final class EquatableKeyPathCollectionBuilder { -% # 16 is arbitrary, but there has to be a limit somewhere -% parameterCountList = range(16) -% for parameterCount in parameterCountList: -% parametersRange = range(parameterCount + 1) - /// Build an `EquatableKeyPathCollection` with the provided key paths. - /// -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] - /// - parameter keyPath${character}: An `Equatable` key path to add to the `EquatableKeyPathCollection`. -% end - /// - returns: The built `EquatableKeyPathCollection`. - public static func buildBlock< -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] -% if isLast: - Value${character}: Equatable -% else: - Value${character}: Equatable, -% end -% end - >( -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] -% isLast = characterIndex == parametersRange[-1] -% if isLast: - _ keyPath${character}: KeyPath -% else: - _ keyPath${character}: KeyPath, -% end -% end - ) -> EquatableKeyPathCollection { - var collection = EquatableKeyPathCollection() -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] - collection.addEquatableKeyPath(keyPath${character}) -% end - return collection - } -% if parameterCount != parameterCountList[-1]: - -% end -% end -} -#endif diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift b/Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift deleted file mode 100644 index 0b6c825..0000000 --- a/Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift +++ /dev/null @@ -1,1418 +0,0 @@ -// This file is generated. Do not edit it. -#if swift(>=5.4) -/// A result builder used to build `HashableKeyPathCollection` values. -@resultBuilder -public final class HashableKeyPathCollectionBuilder { - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable - >( - _ keyPathA: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathN: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable, - ValueN: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - collection.addHashableKeyPath(keyPathN) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathN: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathO: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable, - ValueN: Hashable, - ValueO: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - collection.addHashableKeyPath(keyPathN) - collection.addHashableKeyPath(keyPathO) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathN: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathO: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathP: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable, - ValueN: Hashable, - ValueO: Hashable, - ValueP: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath, - _ keyPathP: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - collection.addHashableKeyPath(keyPathN) - collection.addHashableKeyPath(keyPathO) - collection.addHashableKeyPath(keyPathP) - return collection - } -} -#elseif swift(>=5.1) -/// A function builder used to build `HashableKeyPathCollection` values. -@_functionBuilder -public final class HashableKeyPathCollectionBuilder { - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable - >( - _ keyPathA: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathN: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable, - ValueN: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - collection.addHashableKeyPath(keyPathN) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathN: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathO: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable, - ValueN: Hashable, - ValueO: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - collection.addHashableKeyPath(keyPathN) - collection.addHashableKeyPath(keyPathO) - return collection - } - - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// - /// - parameter keyPathA: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathB: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathC: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathD: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathE: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathF: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathG: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathH: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathI: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathJ: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathK: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathL: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathM: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathN: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathO: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - parameter keyPathP: A `Hashable` key path to add to the `HashableKeyPathCollection`. - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< - ValueA: Hashable, - ValueB: Hashable, - ValueC: Hashable, - ValueD: Hashable, - ValueE: Hashable, - ValueF: Hashable, - ValueG: Hashable, - ValueH: Hashable, - ValueI: Hashable, - ValueJ: Hashable, - ValueK: Hashable, - ValueL: Hashable, - ValueM: Hashable, - ValueN: Hashable, - ValueO: Hashable, - ValueP: Hashable - >( - _ keyPathA: KeyPath, - _ keyPathB: KeyPath, - _ keyPathC: KeyPath, - _ keyPathD: KeyPath, - _ keyPathE: KeyPath, - _ keyPathF: KeyPath, - _ keyPathG: KeyPath, - _ keyPathH: KeyPath, - _ keyPathI: KeyPath, - _ keyPathJ: KeyPath, - _ keyPathK: KeyPath, - _ keyPathL: KeyPath, - _ keyPathM: KeyPath, - _ keyPathN: KeyPath, - _ keyPathO: KeyPath, - _ keyPathP: KeyPath - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() - collection.addHashableKeyPath(keyPathA) - collection.addHashableKeyPath(keyPathB) - collection.addHashableKeyPath(keyPathC) - collection.addHashableKeyPath(keyPathD) - collection.addHashableKeyPath(keyPathE) - collection.addHashableKeyPath(keyPathF) - collection.addHashableKeyPath(keyPathG) - collection.addHashableKeyPath(keyPathH) - collection.addHashableKeyPath(keyPathI) - collection.addHashableKeyPath(keyPathJ) - collection.addHashableKeyPath(keyPathK) - collection.addHashableKeyPath(keyPathL) - collection.addHashableKeyPath(keyPathM) - collection.addHashableKeyPath(keyPathN) - collection.addHashableKeyPath(keyPathO) - collection.addHashableKeyPath(keyPathP) - return collection - } -} -#endif diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift.gyb b/Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift.gyb deleted file mode 100644 index 5815071..0000000 --- a/Sources/HashableByKeyPath/ResultBuilderAPI/HashableKeyPathCollectionBuilder.swift.gyb +++ /dev/null @@ -1,101 +0,0 @@ -% import string -// This file is generated. Do not edit it. -#if swift(>=5.4) -/// A result builder used to build `HashableKeyPathCollection` values. -@resultBuilder -public final class HashableKeyPathCollectionBuilder { -% # 16 is arbitrary, but there has to be a limit somewhere -% parameterCountList = range(16) -% for parameterCount in parameterCountList: -% parametersRange = range(parameterCount + 1) - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] - /// - parameter keyPath${character}: A `Hashable` key path to add to the `HashableKeyPathCollection`. -% end - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] -% if isLast: - Value${character}: Hashable -% else: - Value${character}: Hashable, -% end -% end - >( -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] -% isLast = characterIndex == parametersRange[-1] -% if isLast: - _ keyPath${character}: KeyPath -% else: - _ keyPath${character}: KeyPath, -% end -% end - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] - collection.addHashableKeyPath(keyPath${character}) -% end - return collection - } -% if parameterCount != parameterCountList[-1]: - -% end -% end -} -#elseif swift(>=5.1) -/// A function builder used to build `HashableKeyPathCollection` values. -@_functionBuilder -public final class HashableKeyPathCollectionBuilder { -% # 16 is arbitrary, but there has to be a limit somewhere -% parameterCountList = range(16) -% for parameterCount in parameterCountList: -% parametersRange = range(parameterCount + 1) - /// Build a `HashableKeyPathCollection` with the provided key paths. - /// -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] - /// - parameter keyPath${character}: A `Hashable` key path to add to the `HashableKeyPathCollection`. -% end - /// - returns: The built `HashableKeyPathCollection`. - public static func buildBlock< -% for characterIndex in parametersRange: -% isLast = characterIndex == parametersRange[-1] -% character = string.ascii_uppercase[characterIndex] -% if isLast: - Value${character}: Hashable -% else: - Value${character}: Hashable, -% end -% end - >( -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] -% isLast = characterIndex == parametersRange[-1] -% if isLast: - _ keyPath${character}: KeyPath -% else: - _ keyPath${character}: KeyPath, -% end -% end - ) -> HashableKeyPathCollection { - var collection = HashableKeyPathCollection() -% for characterIndex in parametersRange: -% character = string.ascii_uppercase[characterIndex] - collection.addHashableKeyPath(keyPath${character}) -% end - return collection - } -% if parameterCount != parameterCountList[-1]: - -% end -% end -} -#endif diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/Input/Empty.swift b/Sources/HashableByKeyPath/ResultBuilderAPI/Input/Empty.swift new file mode 100644 index 0000000..c7fecb1 --- /dev/null +++ b/Sources/HashableByKeyPath/ResultBuilderAPI/Input/Empty.swift @@ -0,0 +1 @@ +// An empty file, required to have Sourcery generate output using the templates. diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/Output/EquatableKeyPathCollectionBuilder.generated.swift b/Sources/HashableByKeyPath/ResultBuilderAPI/Output/EquatableKeyPathCollectionBuilder.generated.swift new file mode 100644 index 0000000..1ea21b4 --- /dev/null +++ b/Sources/HashableByKeyPath/ResultBuilderAPI/Output/EquatableKeyPathCollectionBuilder.generated.swift @@ -0,0 +1,697 @@ +// Generated using Sourcery 1.9.0 — https://github.com/krzysztofzablocki/Sourcery +// DO NOT EDIT +#if swift(>=5.4) +/// A result builder used to build `EquatableKeyPathCollection` values. +@resultBuilder +public final class EquatableKeyPathCollectionBuilder { + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable + >( + _ keyPath1: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath11: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable, + Value11: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + collection.addEquatableKeyPath(keyPath11) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath11: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath12: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable, + Value11: Equatable, + Value12: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + collection.addEquatableKeyPath(keyPath11) + collection.addEquatableKeyPath(keyPath12) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath11: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath12: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath13: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable, + Value11: Equatable, + Value12: Equatable, + Value13: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + collection.addEquatableKeyPath(keyPath11) + collection.addEquatableKeyPath(keyPath12) + collection.addEquatableKeyPath(keyPath13) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath11: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath12: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath13: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath14: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable, + Value11: Equatable, + Value12: Equatable, + Value13: Equatable, + Value14: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath, + _ keyPath14: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + collection.addEquatableKeyPath(keyPath11) + collection.addEquatableKeyPath(keyPath12) + collection.addEquatableKeyPath(keyPath13) + collection.addEquatableKeyPath(keyPath14) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath11: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath12: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath13: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath14: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath15: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable, + Value11: Equatable, + Value12: Equatable, + Value13: Equatable, + Value14: Equatable, + Value15: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath, + _ keyPath14: KeyPath, + _ keyPath15: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + collection.addEquatableKeyPath(keyPath11) + collection.addEquatableKeyPath(keyPath12) + collection.addEquatableKeyPath(keyPath13) + collection.addEquatableKeyPath(keyPath14) + collection.addEquatableKeyPath(keyPath15) + return collection + } + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath2: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath3: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath4: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath5: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath6: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath7: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath8: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath9: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath10: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath11: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath12: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath13: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath14: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath15: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - parameter keyPath16: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + Value1: Equatable, + Value2: Equatable, + Value3: Equatable, + Value4: Equatable, + Value5: Equatable, + Value6: Equatable, + Value7: Equatable, + Value8: Equatable, + Value9: Equatable, + Value10: Equatable, + Value11: Equatable, + Value12: Equatable, + Value13: Equatable, + Value14: Equatable, + Value15: Equatable, + Value16: Equatable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath, + _ keyPath14: KeyPath, + _ keyPath15: KeyPath, + _ keyPath16: KeyPath + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + collection.addEquatableKeyPath(keyPath1) + collection.addEquatableKeyPath(keyPath2) + collection.addEquatableKeyPath(keyPath3) + collection.addEquatableKeyPath(keyPath4) + collection.addEquatableKeyPath(keyPath5) + collection.addEquatableKeyPath(keyPath6) + collection.addEquatableKeyPath(keyPath7) + collection.addEquatableKeyPath(keyPath8) + collection.addEquatableKeyPath(keyPath9) + collection.addEquatableKeyPath(keyPath10) + collection.addEquatableKeyPath(keyPath11) + collection.addEquatableKeyPath(keyPath12) + collection.addEquatableKeyPath(keyPath13) + collection.addEquatableKeyPath(keyPath14) + collection.addEquatableKeyPath(keyPath15) + collection.addEquatableKeyPath(keyPath16) + return collection + } + +} +#endif \ No newline at end of file diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/Output/HashableKeyPathCollectionBuilder.generated.swift b/Sources/HashableByKeyPath/ResultBuilderAPI/Output/HashableKeyPathCollectionBuilder.generated.swift new file mode 100644 index 0000000..e03af4e --- /dev/null +++ b/Sources/HashableByKeyPath/ResultBuilderAPI/Output/HashableKeyPathCollectionBuilder.generated.swift @@ -0,0 +1,696 @@ +// Generated using Sourcery 1.9.0 — https://github.com/krzysztofzablocki/Sourcery +// DO NOT EDIT +#if swift(>=5.4) +/// A result builder used to build `HashableKeyPathCollection` values. +@resultBuilder +public final class HashableKeyPathCollectionBuilder { + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable + >( + _ keyPath1: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath11: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable, + Value11: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + collection.addHashableKeyPath(keyPath11) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath11: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath12: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable, + Value11: Hashable, + Value12: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + collection.addHashableKeyPath(keyPath11) + collection.addHashableKeyPath(keyPath12) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath11: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath12: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath13: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable, + Value11: Hashable, + Value12: Hashable, + Value13: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + collection.addHashableKeyPath(keyPath11) + collection.addHashableKeyPath(keyPath12) + collection.addHashableKeyPath(keyPath13) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath11: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath12: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath13: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath14: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable, + Value11: Hashable, + Value12: Hashable, + Value13: Hashable, + Value14: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath, + _ keyPath14: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + collection.addHashableKeyPath(keyPath11) + collection.addHashableKeyPath(keyPath12) + collection.addHashableKeyPath(keyPath13) + collection.addHashableKeyPath(keyPath14) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath11: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath12: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath13: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath14: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath15: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable, + Value11: Hashable, + Value12: Hashable, + Value13: Hashable, + Value14: Hashable, + Value15: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath, + _ keyPath14: KeyPath, + _ keyPath15: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + collection.addHashableKeyPath(keyPath11) + collection.addHashableKeyPath(keyPath12) + collection.addHashableKeyPath(keyPath13) + collection.addHashableKeyPath(keyPath14) + collection.addHashableKeyPath(keyPath15) + return collection + } + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + /// - parameter keyPath1: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath2: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath3: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath4: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath5: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath6: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath7: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath8: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath9: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath10: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath11: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath12: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath13: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath14: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath15: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - parameter keyPath16: A `Hashable` key path to add to the `HashableKeyPathCollection`. + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + Value1: Hashable, + Value2: Hashable, + Value3: Hashable, + Value4: Hashable, + Value5: Hashable, + Value6: Hashable, + Value7: Hashable, + Value8: Hashable, + Value9: Hashable, + Value10: Hashable, + Value11: Hashable, + Value12: Hashable, + Value13: Hashable, + Value14: Hashable, + Value15: Hashable, + Value16: Hashable + >( + _ keyPath1: KeyPath, + _ keyPath2: KeyPath, + _ keyPath3: KeyPath, + _ keyPath4: KeyPath, + _ keyPath5: KeyPath, + _ keyPath6: KeyPath, + _ keyPath7: KeyPath, + _ keyPath8: KeyPath, + _ keyPath9: KeyPath, + _ keyPath10: KeyPath, + _ keyPath11: KeyPath, + _ keyPath12: KeyPath, + _ keyPath13: KeyPath, + _ keyPath14: KeyPath, + _ keyPath15: KeyPath, + _ keyPath16: KeyPath + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + collection.addHashableKeyPath(keyPath1) + collection.addHashableKeyPath(keyPath2) + collection.addHashableKeyPath(keyPath3) + collection.addHashableKeyPath(keyPath4) + collection.addHashableKeyPath(keyPath5) + collection.addHashableKeyPath(keyPath6) + collection.addHashableKeyPath(keyPath7) + collection.addHashableKeyPath(keyPath8) + collection.addHashableKeyPath(keyPath9) + collection.addHashableKeyPath(keyPath10) + collection.addHashableKeyPath(keyPath11) + collection.addHashableKeyPath(keyPath12) + collection.addHashableKeyPath(keyPath13) + collection.addHashableKeyPath(keyPath14) + collection.addHashableKeyPath(keyPath15) + collection.addHashableKeyPath(keyPath16) + return collection + } +} +#endif \ No newline at end of file diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/Templates/EquatableKeyPathCollectionBuilder.stencil b/Sources/HashableByKeyPath/ResultBuilderAPI/Templates/EquatableKeyPathCollectionBuilder.stencil new file mode 100644 index 0000000..d332f87 --- /dev/null +++ b/Sources/HashableByKeyPath/ResultBuilderAPI/Templates/EquatableKeyPathCollectionBuilder.stencil @@ -0,0 +1,40 @@ +#if swift(>=5.4) +/// A result builder used to build `EquatableKeyPathCollection` values. +@resultBuilder +public final class EquatableKeyPathCollectionBuilder { + {% for parameterCount in 1...argument.maxArgumentCount %} + /// Build an `EquatableKeyPathCollection` with the provided key paths. + /// + {% for parameter in 1...parameterCount %} + /// - parameter keyPath{{ parameter }}: An `Equatable` key path to add to the `EquatableKeyPathCollection`. + {% endfor %} + /// - returns: The built `EquatableKeyPathCollection`. + public static func buildBlock< + {% for parameter in 1...parameterCount %} + {% if forloop.last %} + Value{{ parameter }}: Equatable + {% else %} + Value{{ parameter }}: Equatable, + {% endif %} + {% endfor %} + >( + {% for parameter in 1...parameterCount %} + {% if forloop.last %} + _ keyPath{{ parameter }}: KeyPath + {% else %} + _ keyPath{{ parameter }}: KeyPath, + {% endif %} + {% endfor %} + ) -> EquatableKeyPathCollection { + var collection = EquatableKeyPathCollection() + {% for parameter in 1...parameterCount %} + collection.addEquatableKeyPath(keyPath{{ parameter }}) + {% endfor %} + return collection + } + {% if forloop.last %} + + {% endif %} + {% endfor %} +} +#endif \ No newline at end of file diff --git a/Sources/HashableByKeyPath/ResultBuilderAPI/Templates/HashableKeyPathCollectionBuilder.stencil b/Sources/HashableByKeyPath/ResultBuilderAPI/Templates/HashableKeyPathCollectionBuilder.stencil new file mode 100644 index 0000000..8590855 --- /dev/null +++ b/Sources/HashableByKeyPath/ResultBuilderAPI/Templates/HashableKeyPathCollectionBuilder.stencil @@ -0,0 +1,37 @@ +#if swift(>=5.4) +/// A result builder used to build `HashableKeyPathCollection` values. +@resultBuilder +public final class HashableKeyPathCollectionBuilder { + {% for parameterCount in 1...argument.maxArgumentCount %} + /// Build a `HashableKeyPathCollection` with the provided key paths. + /// + {% for parameter in 1...parameterCount %} + /// - parameter keyPath{{ parameter }}: A `Hashable` key path to add to the `HashableKeyPathCollection`. + {% endfor %} + /// - returns: The built `HashableKeyPathCollection`. + public static func buildBlock< + {% for parameter in 1...parameterCount %} + {% if forloop.last %} + Value{{ parameter }}: Hashable + {% else %} + Value{{ parameter }}: Hashable, + {% endif %} + {% endfor %} + >( + {% for parameter in 1...parameterCount %} + {% if forloop.last %} + _ keyPath{{ parameter }}: KeyPath + {% else %} + _ keyPath{{ parameter }}: KeyPath, + {% endif %} + {% endfor %} + ) -> HashableKeyPathCollection { + var collection = HashableKeyPathCollection() + {% for parameter in 1...parameterCount %} + collection.addHashableKeyPath(keyPath{{ parameter }}) + {% endfor %} + return collection + } + {% endfor %} +} +#endif \ No newline at end of file