T
- the type of elements.@Incubating public interface HasMultipleValues<T>
T
, such as a collection property.
Note: This interface is not intended for implementation by build script or plugin authors. You can use the factory methods on ObjectFactory
to create instances of this interface.
Modifier and Type | Method and Description |
---|---|
void |
add(Provider<? extends T> provider)
Adds an element to the property value.
|
void |
add(T element)
Adds an element to the property value.
|
void |
addAll(Iterable<? extends T> elements)
Adds zero or more elements to the property value.
|
void |
addAll(Provider<? extends Iterable<? extends T>> provider)
Adds zero or more elements to the property value.
|
void |
addAll(T... elements)
Adds zero or more elements to the property value.
|
void |
set(Iterable<? extends T> elements)
Sets the value of the property the elements of the given iterable.
|
void |
set(Provider<? extends Iterable<? extends T>> provider)
Sets the property to have the same value of the given provider.
|
void set(@Nullable Iterable<? extends T> elements)
This method can also be used to clear the value of the property, by passing null
as the value.
elements
- The elements, can be null.void set(Provider<? extends Iterable<? extends T>> provider)
provider
- Provider of the elements.void add(T element)
element
- The elementvoid add(Provider<? extends T> provider)
The given provider will be queried when the value of this property is queried. This property will have no value when the given provider has no value.
provider
- The provider of an elementvoid addAll(T... elements)
elements
- The elements to addvoid addAll(Iterable<? extends T> elements)
The given iterable will be queried when the value of this property is queried.
elements
- The elements to add.void addAll(Provider<? extends Iterable<? extends T>> provider)
The given provider will be queried when the value of this property is queried. This property will have no value when the given provider has no value.
provider
- Provider of elements