SetProperty

Represents a property whose type is a Set of elements of type T. Retains iteration order.

You can create a SetProperty instance using factory method setProperty.

Note: This interface is not intended for implementation by build script or plugin authors.

Since

4.5

Parameters

<T>

the type of elements.

Functions

Link copied to clipboard
abstract fun add(element: T)
Link copied to clipboard
abstract fun addAll(elements: Array<T>)
Link copied to clipboard
fun <T> HasMultipleValues<T>.assign(elements: Iterable<T?>?)

Sets the value of the property to the elements of the given iterable, and replaces any existing value

fun <T> HasMultipleValues<T>.assign(provider: Provider<out Iterable<T?>?>)

Sets the property to have the same value of the given provider, and replaces any existing value

Link copied to clipboard
abstract fun convention(@Nullable elements: Iterable<out T>): SetProperty<T>
abstract fun convention(provider: Provider<out Iterable<out T>>): SetProperty<T>
Link copied to clipboard
abstract fun disallowChanges()
Link copied to clipboard
abstract fun disallowUnsafeRead()
Link copied to clipboard
abstract fun empty(): SetProperty<T>
Link copied to clipboard
abstract fun filter(spec: Spec<in T>): Provider<T>
Link copied to clipboard
abstract fun finalizeValue()
Link copied to clipboard
abstract fun finalizeValueOnRead()
Link copied to clipboard
abstract fun <S> flatMap(transformer: Transformer<out @Nullable Provider<out S>, in T>): Provider<S>
Link copied to clipboard
Link copied to clipboard
abstract fun get(): T
Link copied to clipboard
abstract fun getOrElse(defaultValue: T): T
Link copied to clipboard
abstract fun getOrNull(): T
Link copied to clipboard
abstract fun isPresent(): Boolean
Link copied to clipboard
abstract fun <S> map(transformer: Transformer<out @Nullable S, in T>): Provider<S>
Link copied to clipboard
abstract fun orElse(value: T): Provider<T>
Link copied to clipboard
abstract fun set(elements: Iterable<out T>)
Link copied to clipboard
abstract fun unset(): SetProperty<T>
This is similar to calling value with a null argument.
Link copied to clipboard
abstract fun unsetConvention(): SetProperty<T>
This is similar to calling convention with a null argument.
Link copied to clipboard
abstract fun value(@Nullable elements: Iterable<out T>): SetProperty<T>
abstract fun value(provider: Provider<out Iterable<out T>>): SetProperty<T>
Link copied to clipboard
abstract fun <U, R> zip(right: Provider<U>, combiner: BiFunction<in T, in U, out @Nullable R>): Provider<R>