ParameterBuilder
Stay organized with collections
Save and categorize content based on your preferences.
@resultBuilder
struct ParameterBuilder<Container>
Undocumented
-
Return Value
The underlying Parameters, in order.
-
Lifts a single TypedParameter expression into a list of Parameters.
This is the only way for a parameter to enter the builder, so only parameters belonging to
Container are accepted.
Return Value
A list containing the underlying Parameter.
-
Builds an empty list of Parameters for an empty builder body.
Declaration
Swift
static func buildBlock() -> [Parameter]
Return Value
An empty list.
-
Combines the lists of Parameters from each statement in a builder body.
Return Value
The concatenation of components, in order.
-
Supports if statements without an else clause.
Parameters
component
|
The Parameters of the if body, or nil if the condition was false.
|
Return Value
The Parameters of the if body, or an empty list.
-
Supports the first branch of if-else and switch statements.
Return Value
component, unchanged.
-
Supports the second branch of if-else and switch statements.
Return Value
component, unchanged.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-11-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Incorrect information","incorrectInformation","thumb-down"],["Not enough information/samples","notEnoughInformationSamples","thumb-down"],["Too complicated","tooComplicated","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-05 UTC."],[],[]]