Skip to content

Commit

Permalink
minor refactor: redefined comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paulk-asert committed Jan 5, 2025
1 parent 0c30ecd commit 08a398e
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/main/java/groovy/util/function/FloatUnaryOperator.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import java.util.Objects;

/**
* Represents an operation on a single {@code float}-valued operand that produces
* a {@code float}-valued result. This is the primitive type specialization of
* Represents an operation that takes a {@code float}-valued operand and produces
* a {@code float}-valued result. This is a specialization of
* {@link java.util.function.UnaryOperator} for {@code float}.
*
* <p>This is a <a href="package-summary.html">functional interface</a>
Expand All @@ -34,22 +34,19 @@
@FunctionalInterface
public interface FloatUnaryOperator {
/**
* Applies this operator to the given operand.
* Applies this operator.
*
* @param operand the operand
* @return the operator result
*/
float applyAsFloat(float operand);

/**
* Returns a composed operator that first applies the {@code before}
* Creates a "backward" composed operator that first applies the {@code before}
* operator to its input, and then applies this operator to the result.
* If evaluation of either operator throws an exception, it is relayed to
* the caller of the composed operator.
*
* @param before the operator to apply before this operator is applied
* @return a composed operator that first applies the {@code before}
* operator and then applies this operator
* @return the composed operator
* @throws NullPointerException if before is null
*
* @see #andThen(FloatUnaryOperator)
Expand All @@ -60,14 +57,11 @@ default FloatUnaryOperator compose(FloatUnaryOperator before) {
}

/**
* Returns a composed operator that first applies this operator to
* Creates a "forward" composed operator that first applies this operator to
* its input, and then applies the {@code after} operator to the result.
* If evaluation of either operator throws an exception, it is relayed to
* the caller of the composed operator.
*
* @param after the operator to apply after this operator is applied
* @return a composed operator that first applies this operator and then
* applies the {@code after} operator
* @return the composed operator
* @throws NullPointerException if after is null
*
* @see #compose(FloatUnaryOperator)
Expand All @@ -78,7 +72,7 @@ default FloatUnaryOperator andThen(FloatUnaryOperator after) {
}

/**
* Returns a unary operator that always returns its input argument.
* Returns the identity float unary operator.
*
* @return a unary operator that always returns its input argument
*/
Expand Down

0 comments on commit 08a398e

Please sign in to comment.