Example usage for java.util.function IntToDoubleFunction applyAsDouble

List of usage examples for java.util.function IntToDoubleFunction applyAsDouble

Introduction

In this page you can find the example usage for java.util.function IntToDoubleFunction applyAsDouble.

Prototype

double applyAsDouble(int value);

Source Link

Document

Applies this function to the given argument.

Usage

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

/**
 * Returns a composed {@link IntBinaryOperator2} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code IntBinaryOperator2} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.//from ww w . ja v a  2 s. c  o  m
 */
@Nonnull
default IntBinaryOperator2 composeFromInt(@Nonnull final IntFunction<? extends T> before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsInt(before1.apply(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToShortFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToShortFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}./* w w  w  . j a  v  a 2 s  .c om*/
 */
@Nonnull
default BiIntToShortFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsShort(before1.apply(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToByteFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToByteFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.//from  www  .  ja  va2 s.co m
 */
@Nonnull
default BiIntToByteFunction composeFromInt(@Nonnull final IntToDoubleFunction before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsByte(before1.applyAsDouble(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToCharFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToCharFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.// w  w w . ja v a2s. com
 */
@Nonnull
default BiIntToCharFunction composeFromInt(@Nonnull final IntToDoubleFunction before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsChar(before1.applyAsDouble(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link IntBinaryOperator2} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code IntBinaryOperator2} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.//from w  ww.j a  v  a 2 s. com
 */
@Nonnull
default IntBinaryOperator2 composeFromInt(@Nonnull final IntToDoubleFunction before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsInt(before1.applyAsDouble(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToDoubleFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToDoubleFunction} that first applies the {@code before} functions to its input,
 * and then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}./*from w  w  w  .  ja  v a 2 s .  co  m*/
 */
@Nonnull
default BiIntToDoubleFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsDouble(before1.apply(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToLongFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToLongFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}./*from  w w w.ja  v  a2 s . c om*/
 */
@Nonnull
default BiIntToLongFunction composeFromInt(@Nonnull final IntFunction<? extends T> before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsLong(before1.apply(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToFloatFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToFloatFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.// w w  w .ja  v a  2 s .  c om
 */
@Nonnull
default BiIntToFloatFunction composeFromInt(@Nonnull final IntToDoubleFunction before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsFloat(before1.applyAsDouble(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToLongFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToLongFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.//from w  w  w .ja  v a 2 s . c  om
 */
@Nonnull
default BiIntToLongFunction composeFromInt(@Nonnull final IntToDoubleFunction before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsLong(before1.applyAsDouble(value1), before2.applyAsDouble(value2));
}

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

/**
 * Returns a composed {@link BiIntToShortFunction} that first applies the {@code before} functions to
 * its input, and then applies this 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 execute an operation which accepts {@code int} input,
 * before this primitive function is executed.
 *
 * @param before1 The first function to apply before this function is applied
 * @param before2 The second function to apply before this function is applied
 * @return A composed {@code BiIntToShortFunction} that first applies the {@code before} functions to its input, and
 * then applies this function to the result.
 * @throws NullPointerException If given argument is {@code null}
 * @implSpec The input argument of this method is a able to handle primitive values. In this case this is {@code
 * int}.//from   www .  jav a2  s.  c  o  m
 */
@Nonnull
default BiIntToShortFunction composeFromInt(@Nonnull final IntToDoubleFunction before1,
        @Nonnull final IntToDoubleFunction before2) {
    Objects.requireNonNull(before1);
    Objects.requireNonNull(before2);
    return (value1, value2) -> applyAsShort(before1.applyAsDouble(value1), before2.applyAsDouble(value2));
}