MeterCollectionBuilder
public final class MeterCollectionBuilder
Stateful building of a Meter.Collection.
-
The end product of this
Meter.Collection.Builder.Declaration
Swift
public typealias Product = Meter.Collection
-
The value which will ultimately be the underlying storage of a
Meter.Collection.Declaration
Swift
public var intermediate: OrderedDictionary<Fraction, Meter> -
The accumulating offset of
Fractionkeys.Declaration
Swift
public var offset: Fraction
-
Create an empty
Meter.Collection.Builderready to help you build up aMeter.Collection.Declaration
Swift
public init(offset: Fraction = .zero) -
Adds the given
elementto theintermediatewith accumulating offsets.Declaration
Swift
@discardableResult public func add(_ element: Meter) -> MeterCollectionBuilderReturn Value
Self. -
Adds each of the given
elementsto theintermediatewith accumulating offsets.Declaration
Swift
@discardableResult public func add <S: Sequence> (_ elements: S) -> Self where S.Element == MeterReturn Value
Self. -
Creates the final
Productwith theintermediate.Declaration
Swift
public func build() -> Product
View on GitHub
Install in Dash
MeterCollectionBuilder Class Reference