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 Summary

    Modifier and Type
    Method
    Description
    as(Function<T,R> valueMapper)
    Specifies a function for mapping the value of the origin selector to another type.
    when(Predicate<T> predicate)
    A predicate that must be satisfied by the value matched by the origin selector.
  • Method Details

    • as

      <T, R> ValueOfOriginDestinationPredicate as(Function<T,R> valueMapper)
      Specifies a function for mapping the value of the origin selector to another type.
      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
    • 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