# BinaryProvider

interface BinaryProvider<T> : Provider<T> (source)

Represents a binary that is created and configured as required.

#### Since

4.5

#### Parameters

<T>

The type of binary.

## Functions

configure
Link copied to clipboard
abstract fun configure(action: Action<in T>)
Registers an action to execute to configure the binary.
filter
Link copied to clipboard
@Incubating
abstract fun filter(spec: Spec<in T>): Provider<T>
Returns a new Provider with the value of this provider if the passed spec is satisfied and no value otherwise.
flatMap
Link copied to clipboard
abstract fun <S> flatMap(transformer: Transformer<out @Nullable Provider<out S>, in T>): Provider<S>
Returns a new Provider from the value of this provider transformed using the given function.
get
Link copied to clipboard
abstract fun get(): T
Returns the value of this provider if it has a value present, otherwise throws `java.lang.IllegalStateException`.
getOrElse
Link copied to clipboard
abstract fun getOrElse(defaultValue: T): T
Returns the value of this provider if it has a value present.
getOrNull
Link copied to clipboard
@Nullable
abstract fun getOrNull(): @Nullable T
Returns the value of this provider if it has a value present.
isPresent
Link copied to clipboard
abstract fun isPresent(): Boolean
Returns `true` if there is a value present, otherwise `false`.
map
Link copied to clipboard
abstract fun <S> map(transformer: Transformer<out @Nullable S, in T>): Provider<S>
Returns a new Provider whose value is the value of this provider transformed using the given function.
orElse
Link copied to clipboard
abstract fun orElse(value: T): Provider<T>
Returns a Provider whose value is the value of this provider, if present, otherwise the given default value.
abstract fun orElse(provider: Provider<out T>): Provider<T>
Returns a Provider whose value is the value of this provider, if present, otherwise uses the value from the given provider, if present.
whenFinalized
Link copied to clipboard
abstract fun whenFinalized(action: Action<in T>)
Registers an action to execute when the binary has been configured.
zip
Link copied to clipboard
abstract fun <U, R> zip(right: Provider<U>, combiner: BiFunction<in T, in U, out @Nullable R>): Provider<R>
Returns a provider which value will be computed by combining this provider value with another provider value using the supplied combiner function.