# get

abstract fun <S> get(type: Class<S>, spec: Spec<in S>): BinaryProvider<S>

Returns a BinaryProvider that contains the single binary matching the specified type and specification. The binary will be in the finalized state. The provider can be used to apply configuration to the element before it is finalized.

Querying the return value will fail when there is not exactly one matching binary.

#### Return

a binary from the collection in a finalized state

#### Parameters

type

type to match

spec

specification to satisfy. The spec is applied to each binary prior to configuration.

<S>

type of the binary to return

abstract fun get(spec: Spec<in T>): BinaryProvider<T>

Returns a Provider that contains the single binary matching the given specification. The binary will be in the finalized state. The provider can be used to apply configuration to the element before it is finalized.

Querying the return value will fail when there is not exactly one matching binary.

#### Return

a binary from the collection in a finalized state

#### Parameters

spec

specification to satisfy. The spec is applied to each binary prior to configuration.

abstract fun get(): Set<T>

Returns the set of binaries from this collection. Elements are in a finalized state.