ListProperty

Represents a property whose type is a List of elements of type T.

You can create a ListProperty instance using factory method listProperty.

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

Since

4.3

Functions

Link copied to clipboard
abstract fun add(element: T)
Link copied to clipboard
abstract fun addAll(elements: Array<T>)
Link copied to clipboard
abstract fun append(element: T)
Link copied to clipboard
abstract fun appendAll(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>): ListProperty<T>
abstract fun convention(provider: Provider<out Iterable<out T>>): ListProperty<T>
Link copied to clipboard
abstract fun disallowChanges()
Link copied to clipboard
abstract fun disallowUnsafeRead()
Link copied to clipboard
abstract fun empty(): ListProperty<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(): ListProperty<T>
This is similar to calling value with a null argument.
Link copied to clipboard
abstract fun unsetConvention(): ListProperty<T>
This is similar to calling convention with a null argument.
Link copied to clipboard
abstract fun value(@Nullable elements: Iterable<out T>): ListProperty<T>
abstract fun value(provider: Provider<out Iterable<out T>>): ListProperty<T>
Link copied to clipboard
abstract fun <U, R> zip(right: Provider<U>, combiner: BiFunction<in T, in U, out @Nullable R>): Provider<R>