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 Details

    • elseGenerate

      <T> Assignment elseGenerate(GeneratorSpecProvider<T> gen)
      Generates values using built-in generators provided by the gen parameter, of type Generators.
      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

      <T> Assignment elseGenerate(GeneratorSpec<T> spec)
      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

      <T> Assignment elseSet(T value)
      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

      <T> Assignment elseSupply(Generator<T> generator)
      Supplies an object using a Generator 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

      <T> Assignment elseSupply(Supplier<T> supplier)
      Supplies an object using a Supplier.
      Type Parameters:
      T - the type of object to generate
      Parameters:
      supplier - for supplying values
      Returns:
      a complete assignment
      Since:
      3.0.0