Example usage for java.util.function IntToLongFunction applyAsLong

List of usage examples for java.util.function IntToLongFunction applyAsLong

Introduction

In this page you can find the example usage for java.util.function IntToLongFunction applyAsLong.

Prototype

long applyAsLong(int value);

Source Link

Document

Applies this function to the given argument.

Usage

From source file:at.gridtec.lambda4j.function.bi.conversion.BiDoubleToIntFunction.java

/**
 * Returns a composed {@link BiDoubleToLongFunction} 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 BiDoubleToLongFunction} 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}./*from  ww  w .j  a v  a  2 s  .  c o  m*/
 */
@Nonnull
default BiDoubleToLongFunction andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsLong(applyAsInt(value1, value2));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToIntFunction.java

/**
 * 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}.//from  w w  w.  j a  va2  s.co m
 */
@Nonnull
default ObjIntToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjByteToIntFunction.java

/**
 * 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}./*from  w w w.  ja v  a 2s .  c  o  m*/
 */
@Nonnull
default ObjByteToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjCharToIntFunction.java

/**
 * Returns a composed {@link ObjCharToLongFunction} 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 ObjCharToLongFunction} 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}.//from  w ww  .  j av  a  2 s  .  c om
 */
@Nonnull
default ObjCharToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToIntFunction.java

/**
 * Returns a composed {@link ObjFloatToLongFunction} 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 ObjFloatToLongFunction} 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}.//from  w  w  w  .j  a  v  a 2 s  . c om
 */
@Nonnull
default ObjFloatToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToIntFunction.java

/**
 * 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}./*from ww w .  j  a  va  2s .com*/
 */
@Nonnull
default ObjShortToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjBooleanToIntFunction.java

/**
 * Returns a composed {@link ObjBooleanToLongFunction} 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 ObjBooleanToLongFunction} 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}./*  ww  w  .  ja va 2  s.c  o m*/
 */
@Nonnull
default ObjBooleanToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToIntFunction.java

/**
 * Returns a composed {@link ObjLongToLongFunction} 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 ObjLongToLongFunction} 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}.//  w  w w  .  j  a va2  s .c om
 */
@Nonnull
default ObjLongToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.function.bi.obj.ObjDoubleToIntFunction.java

/**
 * Returns a composed {@link ObjDoubleToLongFunction} 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 ObjDoubleToLongFunction} 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}.// ww  w  . j  a va2s.c  o  m
 */
@Nonnull
default ObjDoubleToLongFunction<T> andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsLong(applyAsInt(t, value));
}

From source file:at.gridtec.lambda4j.operator.binary.IntBinaryOperator2.java

/**
 * Returns a composed {@link BiIntToLongFunction} 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 long}.
 *
 * @param after The function to apply after this operator is applied
 * @return A composed {@code BiIntToLongFunction} 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
 * long}.//from w  w  w.java  2  s.co  m
 */
@Nonnull
default BiIntToLongFunction andThenToLong(@Nonnull final IntToLongFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsLong(applyAsInt(value1, value2));
}