本文整理汇总了Java中java.util.function.DoubleToLongFunction.applyAsLong方法的典型用法代码示例。如果您正苦于以下问题:Java DoubleToLongFunction.applyAsLong方法的具体用法?Java DoubleToLongFunction.applyAsLong怎么用?Java DoubleToLongFunction.applyAsLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.function.DoubleToLongFunction
的用法示例。
在下文中一共展示了DoubleToLongFunction.applyAsLong方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ObjShortToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to
* the caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code ObjShortToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default ObjShortToLongFunction<T> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, value) -> after.applyAsLong(applyAsDouble(t, value));
}
示例2: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ToLongBiFunction2} that first applies this function to its input, and then applies the
* {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to the
* caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code ToLongBiFunction2} that first applies this function to its input, and then applies the
* {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default ToLongBiFunction2<T, U> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, u) -> after.applyAsLong(applyAsDouble(t, u));
}
示例3: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link TriIntToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to
* the caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code TriIntToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default TriIntToLongFunction andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (value1, value2, value3) -> after.applyAsLong(applyAsDouble(value1, value2, value3));
}
示例4: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link IntToLongFunction2} that first applies this function to its input, and then applies the
* {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to the
* caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code IntToLongFunction2} that first applies this function to its input, and then applies the
* {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default IntToLongFunction2 andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (value) -> after.applyAsLong(applyAsDouble(value));
}
示例5: onlyThird
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Creates a {@link BiObjDoubleToLongFunction} which uses the {@code third} parameter of this one as argument for
* the given {@link DoubleToLongFunction}.
*
* @param <T> The type of the first argument to the function
* @param <U> The type of the second argument to the function
* @param function The function which accepts the {@code third} parameter of this one
* @return Creates a {@code BiObjDoubleToLongFunction} which uses the {@code third} parameter of this one as
* argument for the given {@code DoubleToLongFunction}.
* @throws NullPointerException If given argument is {@code null}
*/
@Nonnull
static <T, U> BiObjDoubleToLongFunction<T, U> onlyThird(@Nonnull final DoubleToLongFunction function) {
Objects.requireNonNull(function);
return (t, u, value) -> function.applyAsLong(value);
}
示例6: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiObjFloatToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result. If evaluation of either operation throws an exception, it is
* relayed to the caller of the composed operation. This method is just convenience, to provide the ability to
* transform this primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code BiObjFloatToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default BiObjFloatToLongFunction<T, U> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, u, value) -> after.applyAsLong(applyAsDouble(t, u, value));
}
示例7: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ObjByteToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to
* the caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code ObjByteToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default ObjByteToLongFunction<T> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, value) -> after.applyAsLong(applyAsDouble(t, value));
}
示例8: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ObjIntToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to
* the caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code ObjIntToLongFunction} that first applies this function to its input, and then applies
* the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default ObjIntToLongFunction<T> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, value) -> after.applyAsLong(applyAsDouble(t, value));
}
示例9: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiObjDoubleToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result. If evaluation of either operation throws an exception, it is
* relayed to the caller of the composed operation. This method is just convenience, to provide the ability to
* transform this primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code BiObjDoubleToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default BiObjDoubleToLongFunction<T, U> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, u, value) -> after.applyAsLong(applyAsDouble(t, u, value));
}
示例10: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link LongSupplier2} that first applies this supplier to its input, and then applies the
* {@code after} function to the result. If evaluation of either operation throws an exception, it is relayed to the
* caller of the composed operation. This method is just convenience, to provide the ability to transform this
* primitive supplier to an operation returning {@code long}.
*
* @param after The function to apply after this supplier is applied
* @return A composed {@code LongSupplier2} that first applies this supplier to its input, and then applies the
* {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default LongSupplier2 andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return () -> after.applyAsLong(getAsDouble());
}
示例11: onlyFirst
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Creates a {@link BiDoubleToLongFunction} which uses the {@code first} parameter of this one as argument for the
* given {@link DoubleToLongFunction}.
*
* @param function The function which accepts the {@code first} parameter of this one
* @return Creates a {@code BiDoubleToLongFunction} which uses the {@code first} parameter of this one as argument
* for the given {@code DoubleToLongFunction}.
* @throws NullPointerException If given argument is {@code null}
*/
@Nonnull
static BiDoubleToLongFunction onlyFirst(@Nonnull final DoubleToLongFunction function) {
Objects.requireNonNull(function);
return (value1, value2) -> function.applyAsLong(value1);
}
示例12: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ObjBiByteToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result. If evaluation of either operation throws an exception, it is
* relayed to the caller of the composed operation. This method is just convenience, to provide the ability to
* transform this primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code ObjBiByteToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default ObjBiByteToLongFunction<T> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, value1, value2) -> after.applyAsLong(applyAsDouble(t, value1, value2));
}
示例13: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link TriBooleanToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result. If evaluation of either operation throws an exception, it is
* relayed to the caller of the composed operation. This method is just convenience, to provide the ability to
* transform this primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code TriBooleanToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default TriBooleanToLongFunction andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (value1, value2, value3) -> after.applyAsLong(applyAsDouble(value1, value2, value3));
}
示例14: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiObjShortToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result. If evaluation of either operation throws an exception, it is
* relayed to the caller of the composed operation. This method is just convenience, to provide the ability to
* transform this primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code BiObjShortToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default BiObjShortToLongFunction<T, U> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, u, value) -> after.applyAsLong(applyAsDouble(t, u, value));
}
示例15: andThenToLong
import java.util.function.DoubleToLongFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiObjCharToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result. If evaluation of either operation throws an exception, it is
* relayed to the caller of the composed operation. This method is just convenience, to provide the ability to
* transform this primitive function to an operation returning {@code long}.
*
* @param after The function to apply after this function is applied
* @return A composed {@code BiObjCharToLongFunction} that first applies this function to its input, and then
* applies the {@code after} function to the result.
* @throws NullPointerException If given argument is {@code null}
* @implSpec The input argument of this method is a able to return primitive values. In this case this is {@code
* long}.
*/
@Nonnull
default BiObjCharToLongFunction<T, U> andThenToLong(@Nonnull final DoubleToLongFunction after) {
Objects.requireNonNull(after);
return (t, u, value) -> after.applyAsLong(applyAsDouble(t, u, value));
}