Package org.gradle.api.provider
Interface SetProperty<T>
-
- Type Parameters:
T- the type of elements.
- All Superinterfaces:
HasMultipleValues<T>,Provider<Set<T>>
@Incubating public interface SetProperty<T> extends Provider<Set<T>>, HasMultipleValues<T>
Represents a property whose type is aSetof elements of typeSetProperty. Retains iteration order.You can create a
SetPropertyinstance using factory methodObjectFactory.setProperty(Class).Note: This interface is not intended for implementation by build script or plugin authors.
- Since:
- 4.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SetProperty<T>convention(Iterable<? extends T> elements)Specifies the value to use as the convention for this property.SetProperty<T>convention(Provider<? extends Iterable<? extends T>> provider)Specifies the provider of the value to use as the convention for this property.SetProperty<T>empty()Sets the value of this property to an empty collection, and replaces any existing value.-
Methods inherited from interface org.gradle.api.provider.HasMultipleValues
add, add, addAll, addAll, addAll, finalizeValue, set, set
-
-
-
-
Method Detail
-
empty
SetProperty<T> empty()
Sets the value of this property to an empty collection, and replaces any existing value.- Specified by:
emptyin interfaceHasMultipleValues<T>- Returns:
- this property.
-
convention
SetProperty<T> convention(Iterable<? extends T> elements)
Specifies the value to use as the convention for this property. The convention is used when no value has been set for this property.- Specified by:
conventionin interfaceHasMultipleValues<T>- Parameters:
elements- The elements- Returns:
- this
-
convention
SetProperty<T> convention(Provider<? extends Iterable<? extends T>> provider)
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.- Specified by:
conventionin interfaceHasMultipleValues<T>- Parameters:
provider- The provider of the elements- Returns:
- this
-
-