Package org.instancio

Interface GivenOrigin


@ExperimentalApi public interface GivenOrigin
Represents an origin selector of a conditional assignment.
Since:
3.0.0
See Also:
  • Method Details

    • satisfies

      <T> GivenOriginPredicate satisfies(Predicate<T> predicate)
      Checks if the origin value matched satisfies given predicate.
      Type Parameters:
      T - type the condition is evaluated against
      Parameters:
      predicate - that must be satisfied by value matched by the origin selector
      Returns:
      assignment builder reference
      Since:
      3.0.0
    • is

      <T> GivenOriginPredicate is(T value)
      Checks if the origin value is equal to given value using Objects.equals(Object, Object).
      Type Parameters:
      T - type the condition is evaluated against
      Parameters:
      value - the value the origin selector's match must be equal to
      Returns:
      assignment builder reference
      Since:
      3.0.0
    • isNot

      <T> GivenOriginPredicate isNot(T value)
      Checks if the origin value is not equal to given value using Objects.equals(Object, Object).
      Type Parameters:
      T - type the condition is evaluated against
      Parameters:
      value - the value the origin selector's match must NOT be equal to
      Returns:
      assignment builder reference
      Since:
      3.0.0
    • isIn

      <T> GivenOriginPredicate isIn(T... values)
      Checks if the origin value is equal to any of given values using Objects.equals(Object, Object).
      Type Parameters:
      T - type the condition is evaluated against
      Parameters:
      values - the values to compare origin selector's match against
      Returns:
      assignment builder reference
      Since:
      3.0.0