Package org.gradle.api.provider
Interface ListProperty<T>
-
- Type Parameters:
T
- the type of elements.
@Incubating public interface ListProperty<T> extends Property<List<T>>
Represents a property whose type is aList
of elements of typeListProperty
.Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory method
ObjectFactory.listProperty(Class)
.- Since:
- 4.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(Provider<? extends T> provider)
Adds an element to the property given by the provider without evaluating existing providers already present.void
add(T element)
Adds an element to the property without evaluating existing providers already present.void
addAll(Provider<? extends Iterable<T>> provider)
Adds a collection of elements to the property given by the provider without evaluating existing providers
-
-
-
Method Detail
-
add
void add(T element)
Adds an element to the property without evaluating existing providers already present.- Parameters:
element
- The element- Throws:
NullPointerException
- if the specified element is null- Since:
- 4.4
-
add
void add(Provider<? extends T> provider)
Adds an element to the property given by the provider without evaluating existing providers already present.The given provider will be queried when it's time to get the value of the property. This property will be unchanged if its value is not defined.
- Parameters:
provider
- Provider- Since:
- 4.4
-
addAll
void addAll(Provider<? extends Iterable<T>> provider)
Adds a collection of elements to the property given by the provider without evaluating existing providersThe given provider will be queried when it's time to get the value of the property. This property will be unchanged if its value is not defined.
- Parameters:
provider
- Provider of elements- Since:
- 4.4
-
-