T
- the type of elements.HasConfigurableValue
, HasMultipleValues<T>
, Provider<java.util.List<T>>
public interface ListProperty<T> extends Provider<java.util.List<T>>, HasMultipleValues<T>
List
of elements of type ListProperty
.
You can create a ListProperty
instance using factory method ObjectFactory.listProperty(Class)
.
Note: This interface is not intended for implementation by build script or plugin authors.
Modifier and Type | Method | Description |
---|---|---|
ListProperty<T> |
convention(java.lang.Iterable<? extends T> elements) |
Specifies the value to use as the convention for this property.
|
ListProperty<T> |
convention(Provider<? extends java.lang.Iterable<? extends T>> provider) |
Specifies the provider of the value to use as the convention for this property.
|
ListProperty<T> |
empty() |
Sets the value of this property to an empty collection, and replaces any existing value.
|
ListProperty<T> |
value(java.lang.Iterable<? extends T> elements) |
Sets the value of the property to the elements of the given iterable, and replaces any existing value.
|
ListProperty<T> |
value(Provider<? extends java.lang.Iterable<? extends T>> provider) |
Sets the property to have the same value of the given provider, and replaces any existing value.
|
disallowChanges, disallowUnsafeRead, finalizeValueOnRead
add, add, addAll, addAll, addAll, finalizeValue, set, set
ListProperty<T> empty()
empty
in interface HasMultipleValues<T>
ListProperty<T> value(@Nullable java.lang.Iterable<? extends T> elements)
This is the same as HasMultipleValues.set(Iterable)
but returns this property to allow method chaining.
value
in interface HasMultipleValues<T>
elements
- The elements, can be null.ListProperty<T> value(Provider<? extends java.lang.Iterable<? extends T>> provider)
This is the same as HasMultipleValues.set(Provider)
but returns this property to allow method chaining.
value
in interface HasMultipleValues<T>
provider
- Provider of the elements.ListProperty<T> convention(@Nullable java.lang.Iterable<? extends T> elements)
convention
in interface HasMultipleValues<T>
elements
- The elements, or null
when the convention is that the property has no value.ListProperty<T> convention(Provider<? extends java.lang.Iterable<? extends T>> provider)
convention
in interface HasMultipleValues<T>
provider
- The provider of the elements