Interface IntFunction

All Superinterfaces:
Serializable

public interface IntFunction extends Serializable
An interface representing a univariate int function.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    default int
    apply(int x)
    Computes the value of the function at x.
    int
    f(int x)
    Computes the value of the function at x.
  • Method Details Link icon

    • f Link icon

      int f(int x)
      Computes the value of the function at x.
      Parameters:
      x - an integer value.
      Returns:
      the function value.
    • apply Link icon

      default int apply(int x)
      Computes the value of the function at x. It delegates the computation to f(). This is simply for Scala convenience.
      Parameters:
      x - an integer value.
      Returns:
      the function value.