Package org.instancio

Interface ValueOfOriginDestination

All Superinterfaces:
Assignment

@ExperimentalApi public interface ValueOfOriginDestination extends Assignment
An assigment containing origin and destination selectors.
Since:
3.0.0
  • Method Details

    • as

      <T, R> ValueOfOriginDestinationPredicate as(Function<T,R> valueMapper)
      Specifies a function for mapping the value of the origin selector to another value.
      Type Parameters:
      T - the origin value type
      R - the destination value type
      Parameters:
      valueMapper - a function for mapping the origin value
      Returns:
      continuation of the builder for optionally specifying a predicate
      Since:
      3.0.0
      See Also:
    • as

      <T, R> ValueOfOriginDestinationPredicate as(RandomFunction<T,R> valueMapper)
      Specifies a function for mapping the value of the origin selector to another (randomised) value.
      Type Parameters:
      T - the origin value type
      R - the destination value type
      Parameters:
      valueMapper - a function for mapping the origin value
      Returns:
      continuation of the builder for optionally specifying a predicate
      Since:
      5.0.0
      See Also:
    • when

      <T> Assignment when(Predicate<T> predicate)
      A predicate that must be satisfied by the value matched by the origin selector.
      Type Parameters:
      T - the type of the value matched by the origin selector
      Parameters:
      predicate - to check the origin value against
      Returns:
      an assignment
      Since:
      3.0.0