Package zone.lamprey.function
Interface LongFunction<R>
- Type Parameters:
R- the type of the result of the function
- All Superinterfaces:
Function<Long,R>,Function<Long,R>,LongFunction<R>
- All Known Subinterfaces:
LongPredicate,LongToDoubleFunction,LongToIntFunction,LongUnaryOperator
- 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 LongFunction<R> extends Function<Long,R>, LongFunction<R>
Represents a function that accepts a long-valued argument and produces a
result. This is the
long-consuming primitive specialization for
Function.
This is a functional interface whose
functional method is apply(long).
- Since:
- 1.8
- See Also:
Function
-
Field Summary
Fields Modifier and Type Field Description static LongFunction<String>TO_STRINGFunctional interface toString.valueOf(long) -
Method Summary
Modifier and Type Method Description Rapply(long value)Applies this function to the given argument.default Rapply(Long t)Applies this function to the given argument.default Supplier<R>applyPartial(long t)Partially apply a parameter such that a single param function becomes a no-param supplier.default LongConsumerconsume(Consumer<R> consumer)Consume a function.static LongUnaryOperatoridentity()Returns a unary operator that always returns its input argument.default <S> LongFunction<S>map(Function<? super R,? extends S> functor)Lift a function.default LongToDoubleFunctionmapToDouble(ToDoubleFunction<? super R> functor)Lift a function.default LongToIntFunctionmapToInt(ToIntFunction<? super R> functor)Lift a function.default LongUnaryOperatormapToLong(ToLongFunction<? super R> functor)Lift a function.default LongPredicatemapToPredicate(Predicate<? super R> functor)Lift a function.
-
Field Details
-
TO_STRING
Functional interface toString.valueOf(long)
-
-
Method Details
-
apply
Applies this function to the given argument.- Specified by:
applyin interfaceLongFunction<R>- Parameters:
value- the function argument- Returns:
- the function result
-
apply
Applies this function to the given argument. -
applyPartial
Partially apply a parameter such that a single param function becomes a no-param supplier.- Parameters:
t- The parameter to apply.- Returns:
- A partially-applied function.
-
consume
Consume a function. -
mapToPredicate
Lift a function.- Specified by:
mapToPredicatein interfaceFunction<Long,R>- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-
map
Lift a function. -
mapToLong
Lift a function. -
mapToInt
Lift a function. -
mapToDouble
Lift a function.- Specified by:
mapToDoublein interfaceFunction<Long,R>- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-
identity
Returns a unary operator that always returns its input argument.- Returns:
- a unary operator that always returns its input argument
-