25 package java.util.function;
26
27 /**
28 * An operation on a single {@code long} operand yielding a {@code long} result.
29 * This is the primitive type specialization of {@link UnaryOperator} for
30 * {@code long}.
31 *
32 * @see UnaryOperator
33 * @since 1.8
34 */
35 @FunctionalInterface
36 public interface LongUnaryOperator {
37
38 /**
39 * Returns the {@code long} result of the operation upon the {@code long}
40 * operand.
41 *
42 * @param operand the operand value
43 * @return the operation result value
44 */
45 public long applyAsLong(long operand);
46 }
|
25 package java.util.function;
26
27 /**
28 * An operation on a single {@code long} operand yielding a {@code long} result.
29 * This is the primitive type specialization of {@link UnaryOperator} for
30 * {@code long}.
31 *
32 * @see UnaryOperator
33 * @since 1.8
34 */
35 @FunctionalInterface
36 public interface LongUnaryOperator {
37
38 /**
39 * Returns the {@code long} result of the operation upon the {@code long}
40 * operand.
41 *
42 * @param operand the operand value
43 * @return the operation result value
44 */
45 long applyAsLong(long operand);
46
47 /**
48 * Returns a unary operator that provides its input value as the result.
49 *
50 * @return a unary operator that provides its input value as the result
51 */
52 static LongUnaryOperator identity() {
53 return t -> t;
54 }
55 }
|