当前位置: 首页>>代码示例>>Java>>正文


Java DoubleToIntFunction.applyAsInt方法代码示例

本文整理汇总了Java中java.util.function.DoubleToIntFunction.applyAsInt方法的典型用法代码示例。如果您正苦于以下问题:Java DoubleToIntFunction.applyAsInt方法的具体用法?Java DoubleToIntFunction.applyAsInt怎么用?Java DoubleToIntFunction.applyAsInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.function.DoubleToIntFunction的用法示例。


在下文中一共展示了DoubleToIntFunction.applyAsInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ToIntFunction2} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ToIntFunction2} 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
 * int}.
 */
@Nonnull
default ToIntFunction2<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t) -> after.applyAsInt(applyAsDouble(t));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ToDoubleFunction2.java

示例2: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjByteToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjByteToIntFunction} 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
 * int}.
 */
@Nonnull
default ObjByteToIntFunction<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsInt(applyAsDouble(t, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjByteToDoubleFunction.java

示例3: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link BiObjBooleanToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code BiObjBooleanToIntFunction} 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
 * int}.
 */
@Nonnull
default BiObjBooleanToIntFunction<T, U> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, u, value) -> after.applyAsInt(applyAsDouble(t, u, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:BiObjBooleanToDoubleFunction.java

示例4: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjBiFloatToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjBiFloatToIntFunction} 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
 * int}.
 */
@Nonnull
default ObjBiFloatToIntFunction<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, value1, value2) -> after.applyAsInt(applyAsDouble(t, value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjBiFloatToDoubleFunction.java

示例5: call

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Calls the given {@link DoubleToIntFunction} with the given argument and returns its result.
 *
 * @param function The function to be called
 * @param value The argument to the function
 * @return The result from the given {@code DoubleToIntFunction2}.
 * @throws NullPointerException If given argument is {@code null}
 */
static int call(@Nonnull final DoubleToIntFunction function, double value) {
    Objects.requireNonNull(function);
    return function.applyAsInt(value);
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:13,代码来源:DoubleToIntFunction2.java

示例6: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjBiCharToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjBiCharToIntFunction} 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
 * int}.
 */
@Nonnull
default ObjBiCharToIntFunction<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, value1, value2) -> after.applyAsInt(applyAsDouble(t, value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjBiCharToDoubleFunction.java

示例7: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link TriLongToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code TriLongToIntFunction} 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
 * int}.
 */
@Nonnull
default TriLongToIntFunction andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.applyAsInt(applyAsDouble(value1, value2, value3));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:TriLongToDoubleFunction.java

示例8: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjDoubleToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjDoubleToIntFunction} 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
 * int}.
 */
@Nonnull
default ObjDoubleToIntFunction<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsInt(applyAsDouble(t, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjDoubleToDoubleFunction.java

示例9: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link IntBinaryOperator2} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code IntBinaryOperator2} 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
 * int}.
 */
@Nonnull
default IntBinaryOperator2 andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsInt(applyAsDouble(value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:BiIntToDoubleFunction.java

示例10: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjLongToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjLongToIntFunction} 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
 * int}.
 */
@Nonnull
default ObjLongToIntFunction<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsInt(applyAsDouble(t, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjLongToDoubleFunction.java

示例11: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link BiDoubleToIntFunction} that first applies this operator 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 operator to an operation returning {@code int}.
 *
 * @param after The function to apply after this operator is applied
 * @return A composed {@code BiDoubleToIntFunction} that first applies this operator 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
 * int}.
 */
@Nonnull
default BiDoubleToIntFunction andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsInt(applyAsDouble(value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:DoubleBinaryOperator2.java

示例12: onlySecond

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Creates a {@link TriDoubleToIntFunction} which uses the {@code second} parameter of this one as argument for the
 * given {@link DoubleToIntFunction}.
 *
 * @param function The function which accepts the {@code second} parameter of this one
 * @return Creates a {@code TriDoubleToIntFunction} which uses the {@code second} parameter of this one as argument
 * for the given {@code DoubleToIntFunction}.
 * @throws NullPointerException If given argument is {@code null}
 */
@Nonnull
static TriDoubleToIntFunction onlySecond(@Nonnull final DoubleToIntFunction function) {
    Objects.requireNonNull(function);
    return (value1, value2, value3) -> function.applyAsInt(value2);
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:15,代码来源:TriDoubleToIntFunction.java

示例13: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link TriShortToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code TriShortToIntFunction} 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
 * int}.
 */
@Nonnull
default TriShortToIntFunction andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.applyAsInt(applyAsDouble(value1, value2, value3));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:TriShortToDoubleFunction.java

示例14: onlySecond

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Creates a {@link BiDoubleToIntFunction} which uses the {@code second} parameter of this one as argument for the
 * given {@link DoubleToIntFunction}.
 *
 * @param function The function which accepts the {@code second} parameter of this one
 * @return Creates a {@code BiDoubleToIntFunction} which uses the {@code second} parameter of this one as argument
 * for the given {@code DoubleToIntFunction}.
 * @throws NullPointerException If given argument is {@code null}
 */
@Nonnull
static BiDoubleToIntFunction onlySecond(@Nonnull final DoubleToIntFunction function) {
    Objects.requireNonNull(function);
    return (value1, value2) -> function.applyAsInt(value2);
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:15,代码来源:BiDoubleToIntFunction.java

示例15: andThenToInt

import java.util.function.DoubleToIntFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjIntToIntFunction} 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 int}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjIntToIntFunction} 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
 * int}.
 */
@Nonnull
default ObjIntToIntFunction<T> andThenToInt(@Nonnull final DoubleToIntFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsInt(applyAsDouble(t, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjIntToDoubleFunction.java


注:本文中的java.util.function.DoubleToIntFunction.applyAsInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。