Package org.instancio
Interface GivenOriginDestination
- All Known Subinterfaces:
GivenOriginDestinationAction
Represents an origin and a destination of a conditional assigment.
- Since:
- 3.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<S,T> GivenOriginDestinationAction generate(Predicate<S> predicate, GeneratorSpec<T> spec) Generates values using arbitrary generator specs.<S,T> GivenOriginDestinationAction generate(Predicate<S> predicate, GeneratorSpecProvider<T> gen) Generates values using built-in generators provided by thegenparameter, of typeGenerators.<S,T> GivenOriginDestinationAction Sets a value to matching selector targets.<S,T> GivenOriginDestinationAction Supplies an object using aSupplier.<S,T> GivenOriginDestinationAction Supplies an object using aGeneratorto matching selector targets.
-
Method Details
-
generate
Generates values using built-in generators provided by thegenparameter, of typeGenerators.This method provides the same functionality as the top-level API:
InstancioApi.generate(TargetSelector, GeneratorSpecProvider)- Type Parameters:
S- the type of object the predicate is evaluated againstT- the type of object to generate- Parameters:
predicate- that must be satisfied by the predicategen- provider of customisable built-in generators (also known as specs)- Returns:
- assignment builder reference
- Since:
- 3.0.0
-
generate
Generates values using arbitrary generator specs.This method provides the same functionality as the top-level API:
InstancioApi.generate(TargetSelector, GeneratorSpec)- Type Parameters:
S- the type of object the predicate is evaluated againstT- the type of object to generate- Parameters:
predicate- that must be satisfied by the predicatespec- generator spec for generating values- Returns:
- assignment builder reference
- Since:
- 3.0.0
-
set
Sets a value to matching selector targets.This method provides the same functionality as the top-level API:
InstancioApi.set(TargetSelector, Object)- Type Parameters:
S- the type of object the predicate is evaluated againstT- the type of object to set- Parameters:
predicate- that must be satisfied by the predicatevalue- value to set- Returns:
- assignment builder reference
- Since:
- 3.0.0
-
supply
Supplies an object using aGeneratorto matching selector targets.This method provides the same functionality as the top-level API:
InstancioApi.supply(TargetSelector, Generator)- Type Parameters:
S- the type of object the predicate is evaluated againstT- the type of object to generate- Parameters:
predicate- that must be satisfied by the predicategenerator- for generating values- Returns:
- assignment builder reference
- Since:
- 3.0.0
-
supply
Supplies an object using aSupplier.This method provides the same functionality as the top-level API:
InstancioApi.supply(TargetSelector, Supplier)- Type Parameters:
S- the type of object the predicate is evaluated againstT- the type of object to supply- Parameters:
predicate- that must be satisfied by the predicatesupplier- for supplying values- Returns:
- assignment builder reference
- Since:
- 3.0.0
-