NamedDomainObjectProvider

Provides a domain object of the given type.

Since

4.10

Parameters

<T>

type of domain object

Inheritors

Functions

Link copied to clipboard
abstract fun configure(action: Action<in T>)
Configures the domain object with the given action.
Link copied to clipboard
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.
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.
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.
Link copied to clipboard
abstract fun getName(): String
The domain object name referenced by this provider.
Link copied to clipboard
abstract fun getOrElse(defaultValue: T): T
Returns the value of this provider if it has a value present.
Link copied to clipboard
@Nullable
abstract fun getOrNull(): @Nullable T
Returns the value of this provider if it has a value present.
Link copied to clipboard
inline operator fun <T : Any, U : T> NamedDomainObjectProvider<out T>.getValue(thisRef: Any?, property: KProperty<*>): U

Allows a NamedDomainObjectProvider to be used as a property delegate.

Link copied to clipboard
operator fun <T : Any> NamedDomainObjectProvider<T>.invoke(action: T.() -> Unit)

Allows a NamedDomainObjectProvider to be configured via invocation syntax.

Link copied to clipboard
abstract fun isPresent(): Boolean
Returns true if there is a value present, otherwise false.
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.
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.
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.