Package org.instancio
Interface GivenOriginDestinationAction
- All Superinterfaces:
Assignment
,GivenOriginDestination
@ExperimentalApi
public interface GivenOriginDestinationAction
extends GivenOriginDestination, Assignment
Defines optional methods that can be chained to
Assign.given(TargetSelector)
builder expression.- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescription<T> Assignment
elseGenerate
(GeneratorSpec<T> spec) Generates values using arbitrary generator specs.<T> Assignment
elseGenerate
(GeneratorSpecProvider<T> gen) Generates values using built-in generators provided by thegen
parameter, of typeGenerators
.<T> Assignment
elseSet
(T value) Sets a value to matching selector targets.<T> Assignment
elseSupply
(Supplier<T> supplier) Supplies an object using aSupplier
.<T> Assignment
elseSupply
(Generator<T> generator) Supplies an object using aGenerator
to matching selector targets.
-
Method Details
-
elseGenerate
Generates values using built-in generators provided by thegen
parameter, of typeGenerators
.- Type Parameters:
T
- the type of object to generate- Parameters:
gen
- provider of customisable built-in generators (also known as specs)- Returns:
- a complete assignment
- Since:
- 3.0.0
-
elseGenerate
Generates values using arbitrary generator specs.- Type Parameters:
T
- the type of object to generate- Parameters:
spec
- generator spec for generating values- Returns:
- a complete assignment
- Since:
- 3.0.0
-
elseSet
Sets a value to matching selector targets.- Type Parameters:
T
- the type of object to generate- Parameters:
value
- value to set- Returns:
- a complete assignment
- Since:
- 3.0.0
-
elseSupply
Supplies an object using aGenerator
to matching selector targets.- Type Parameters:
T
- the type of object to generate- Parameters:
generator
- for generating values- Returns:
- a complete assignment
- Since:
- 3.0.0
-
elseSupply
Supplies an object using aSupplier
.- Type Parameters:
T
- the type of object to generate- Parameters:
supplier
- for supplying values- Returns:
- a complete assignment
- Since:
- 3.0.0
-