Package org.instancio

Interface RandomUnaryOperator<T>

Type Parameters:
T - the type of the input and output of the function
All Superinterfaces:
RandomFunction<T,T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@ExperimentalApi @FunctionalInterface public interface RandomUnaryOperator<T> extends RandomFunction<T,T>
Represents a unary operator that produces a result of the same type as its operand. This operator can use an additional Random parameter for randomising the output, if necessary.
Since:
5.0.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(T input, Random random)
    Applies this operator to the given operand, using the provided Random instance.
  • Method Details

    • apply

      @ExperimentalApi T apply(T input, Random random)
      Applies this operator to the given operand, using the provided Random instance.
      Specified by:
      apply in interface RandomFunction<T,T>
      Parameters:
      input - the function input
      random - instance for randomising the result
      Returns:
      the function result
      Since:
      5.0.0