本文整理汇总了Java中java.util.function.LongToIntFunction.applyAsInt方法的典型用法代码示例。如果您正苦于以下问题:Java LongToIntFunction.applyAsInt方法的具体用法?Java LongToIntFunction.applyAsInt怎么用?Java LongToIntFunction.applyAsInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.function.LongToIntFunction
的用法示例。
在下文中一共展示了LongToIntFunction.applyAsInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的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 LongToIntFunction after) {
Objects.requireNonNull(after);
return (t) -> after.applyAsInt(applyAsLong(t));
}
示例2: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ToIntTriFunction} 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 ToIntTriFunction} 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 ToIntTriFunction<T, U, V> andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (t, u, v) -> after.applyAsInt(applyAsLong(t, u, v));
}
示例3: onlyThird
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Creates a {@link TriLongToIntFunction} which uses the {@code third} parameter of this one as argument for the
* given {@link LongToIntFunction}.
*
* @param function The function which accepts the {@code third} parameter of this one
* @return Creates a {@code TriLongToIntFunction} which uses the {@code third} parameter of this one as argument for
* the given {@code LongToIntFunction}.
* @throws NullPointerException If given argument is {@code null}
*/
@Nonnull
static TriLongToIntFunction onlyThird(@Nonnull final LongToIntFunction function) {
Objects.requireNonNull(function);
return (value1, value2, value3) -> function.applyAsInt(value3);
}
示例4: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiObjCharToIntFunction} 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 BiObjCharToIntFunction} 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 BiObjCharToIntFunction<T, U> andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (t, u, value) -> after.applyAsInt(applyAsLong(t, u, value));
}
示例5: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link TriBooleanToIntFunction} 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 TriBooleanToIntFunction} 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 TriBooleanToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value1, value2, value3) -> after.applyAsInt(applyAsLong(value1, value2, value3));
}
示例6: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ObjBooleanToIntFunction} 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 ObjBooleanToIntFunction} 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 ObjBooleanToIntFunction<T> andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (t, value) -> after.applyAsInt(applyAsLong(t, value));
}
示例7: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link TriCharToIntFunction} 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 TriCharToIntFunction} 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 TriCharToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value1, value2, value3) -> after.applyAsInt(applyAsLong(value1, value2, value3));
}
示例8: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link FloatToIntFunction} 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 FloatToIntFunction} 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 FloatToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value) -> after.applyAsInt(applyAsLong(value));
}
示例9: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ObjBiDoubleToIntFunction} 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 ObjBiDoubleToIntFunction} 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 ObjBiDoubleToIntFunction<T> andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (t, value1, value2) -> after.applyAsInt(applyAsLong(t, value1, value2));
}
示例10: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiCharToIntFunction} 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 BiCharToIntFunction} 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 BiCharToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value1, value2) -> after.applyAsInt(applyAsLong(value1, value2));
}
示例11: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BooleanToIntFunction} 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 BooleanToIntFunction} 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 BooleanToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value) -> after.applyAsInt(applyAsLong(value));
}
示例12: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的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 LongToIntFunction after) {
Objects.requireNonNull(after);
return (value1, value2, value3) -> after.applyAsInt(applyAsLong(value1, value2, value3));
}
示例13: onlySecond
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Creates a {@link BiLongToIntFunction} which uses the {@code second} parameter of this one as argument for the
* given {@link LongToIntFunction}.
*
* @param function The function which accepts the {@code second} parameter of this one
* @return Creates a {@code BiLongToIntFunction} which uses the {@code second} parameter of this one as argument for
* the given {@code LongToIntFunction}.
* @throws NullPointerException If given argument is {@code null}
*/
@Nonnull
static BiLongToIntFunction onlySecond(@Nonnull final LongToIntFunction function) {
Objects.requireNonNull(function);
return (value1, value2) -> function.applyAsInt(value2);
}
示例14: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link ByteToIntFunction} 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 ByteToIntFunction} 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 ByteToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value) -> after.applyAsInt(applyAsLong(value));
}
示例15: andThenToInt
import java.util.function.LongToIntFunction; //导入方法依赖的package包/类
/**
* Returns a composed {@link BiFloatToIntFunction} 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 BiFloatToIntFunction} 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 BiFloatToIntFunction andThenToInt(@Nonnull final LongToIntFunction after) {
Objects.requireNonNull(after);
return (value1, value2) -> after.applyAsInt(applyAsLong(value1, value2));
}