Package org.gradle.api.provider
Schnittstelle ListProperty<T>
- Typparameter:
T- the type of elements.
- Alle Superschnittstellen:
HasConfigurableValue,HasMultipleValues<T>,Provider<List<T>>,SupportsConvention
Represents a property whose type is a
List of elements of type ListProperty.
You can create a ListProperty instance using factory method ObjectFactory.listProperty(Class).
Instances of this interface are not thread-safe for reading and writing. It is not safe to share the same ListProperty instance between different projects.
Note: This interface is not intended for implementation by build script or plugin authors.
- Seit:
- 4.3
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungconvention(Iterable<? extends T> elements) Specifies the value to use as the convention for this property.convention(Provider<? extends Iterable<? extends T>> provider) Specifies the provider of the value to use as the convention for this property.empty()Sets the value of this property to an empty collection, and replaces any existing value.unset()Unsets this object's explicit value, allowing the convention to be selected when evaluating this object's value.Unsets this object's convention value.Sets the value of the property to the elements of the given iterable, and replaces any existing value.Sets the property to have the same value of the given provider, and replaces any existing value.Von Schnittstelle geerbte Methoden org.gradle.api.provider.HasConfigurableValue
disallowChanges, disallowUnsafeRead, finalizeValueOnReadVon Schnittstelle geerbte Methoden org.gradle.api.provider.HasMultipleValues
add, add, addAll, addAll, addAll, finalizeValue, set, set
-
Methodendetails
-
empty
ListProperty<T> empty()Sets the value of this property to an empty collection, and replaces any existing value.- Angegeben von:
emptyin SchnittstelleHasMultipleValues<T>- Gibt zurück:
- this property.
-
value
Sets the value of the property to the elements of the given iterable, and replaces any existing value. This property will query the elements of the iterable each time the value of this property is queried.This is the same as
HasMultipleValues.set(Iterable)but returns this property to allow method chaining.- Angegeben von:
valuein SchnittstelleHasMultipleValues<T>- Parameter:
elements- The elements, can be null.- Gibt zurück:
- this
-
value
Sets the property to have the same value of the given provider, and replaces any existing value. This property will track the value of the provider and query its value each time the value of this property is queried. When the provider has no value, this property will also have no value.This is the same as
HasMultipleValues.set(Provider)but returns this property to allow method chaining.- Angegeben von:
valuein SchnittstelleHasMultipleValues<T>- Parameter:
provider- Provider of the elements.- Gibt zurück:
- this
-
convention
Specifies the value to use as the convention for this property. The convention is used when no value has been set for this property.- Angegeben von:
conventionin SchnittstelleHasMultipleValues<T>- Parameter:
elements- The elements, ornullwhen the convention is that the property has no value.- Gibt zurück:
- this
-
convention
Specifies the provider of the value to use as the convention for this property. The convention is used when no value has been set for this property.- Angegeben von:
conventionin SchnittstelleHasMultipleValues<T>- Parameter:
provider- The provider of the elements- Gibt zurück:
- this
-
unset
ListProperty<T> unset()Unsets this object's explicit value, allowing the convention to be selected when evaluating this object's value.This is similar to calling
value(Iterable)with anullargument.- Angegeben von:
unsetin SchnittstelleSupportsConvention
-
unsetConvention
ListProperty<T> unsetConvention()Unsets this object's convention value.This is similar to calling
convention(Iterable)with anullargument.- Angegeben von:
unsetConventionin SchnittstelleSupportsConvention
-