FloatUnaryOperator (Groovy 5.1.0)
Description: declaration: package: groovy.util.function, interface: FloatUnaryOperator

Package groovy.util.function

# Interface FloatUnaryOperator

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FloatUnaryOperator
Represents an operation that takes a `float`-valued operand and produces a `float`-valued result. This is a specialization of `UnaryOperator` for `float`.

This is a functional interface whose functional method is `applyAsFloat(float)`.

Since:
  5.0.0
See Also:
  - `UnaryOperator`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default FloatUnaryOperator`
  `andThen(FloatUnaryOperator after)`
  Creates a "forward" composed operator that first applies this operator to its input, and then applies the `after` operator to the result.
  `float`
  `applyAsFloat(float operand)`
  Applies this operator.
  `default FloatUnaryOperator`
  `compose(FloatUnaryOperator before)`
  Creates a "backward" composed operator that first applies the `before` operator to its input, and then applies this operator to the result.
  `static FloatUnaryOperator`
  `identity()`
  Returns the identity float unary operator.

- ## Method Details

  - ### applyAsFloat

    float applyAsFloat(float operand)
    Applies this operator.
    Parameters:
      `operand` - the operand
    Returns:
      the operator result

  - ### compose

    default FloatUnaryOperator compose(FloatUnaryOperator before)
    Creates a "backward" composed operator that first applies the `before` operator to its input, and then applies this operator to the result.
    Parameters:
      `before` - the operator to apply before this operator is applied
    Returns:
      the composed operator
    Throws:
      `NullPointerException` - if before is null
    See Also:
      - `andThen(FloatUnaryOperator)`

  - ### andThen

    default FloatUnaryOperator andThen(FloatUnaryOperator after)
    Creates a "forward" composed operator that first applies this operator to its input, and then applies the `after` operator to the result.
    Parameters:
      `after` - the operator to apply after this operator is applied
    Returns:
      the composed operator
    Throws:
      `NullPointerException` - if after is null
    See Also:
      - `compose(FloatUnaryOperator)`

  - ### identity

    static FloatUnaryOperator identity()
    Returns the identity float unary operator.
    Returns:
      a unary operator that always returns its input argument