List of usage examples for java.util.function ToDoubleFunction applyAsDouble
double applyAsDouble(T value);
From source file:at.gridtec.lambda4j.function.tri.obj.ObjBiIntToDoubleFunction.java
/** * Creates a {@link ObjBiIntToDoubleFunction} which uses the {@code first} parameter of this one as argument for the * given {@link ToDoubleFunction}./* ww w.j av a2s . c o m*/ * * @param <T> The type of the first argument to the function * @param function The function which accepts the {@code first} parameter of this one * @return Creates a {@code ObjBiIntToDoubleFunction} which uses the {@code first} parameter of this one as argument * for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T> ObjBiIntToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value1, value2) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.ObjBiLongToDoubleFunction.java
/** * Creates a {@link ObjBiLongToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./*from w w w. j av a 2 s .com*/ * * @param <T> The type of the first argument to the function * @param function The function which accepts the {@code first} parameter of this one * @return Creates a {@code ObjBiLongToDoubleFunction} which uses the {@code first} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T> ObjBiLongToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value1, value2) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjByteToDoubleFunction.java
/** * Creates a {@link BiObjByteToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./*from w w w .j a va 2s. com*/ * * @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 first} parameter of this one * @return Creates a {@code BiObjByteToDoubleFunction} which uses the {@code first} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjByteToDoubleFunction<T, U> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjByteToDoubleFunction.java
/** * Creates a {@link BiObjByteToDoubleFunction} which uses the {@code second} parameter of this one as argument for * the given {@link ToDoubleFunction}.//from w ww. jav a 2 s. co m * * @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 second} parameter of this one * @return Creates a {@code BiObjByteToDoubleFunction} which uses the {@code second} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjByteToDoubleFunction<T, U> onlySecond(@Nonnull final ToDoubleFunction<? super U> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(u); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjCharToDoubleFunction.java
/** * Creates a {@link BiObjCharToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./*w ww .j a va 2 s .c om*/ * * @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 first} parameter of this one * @return Creates a {@code BiObjCharToDoubleFunction} which uses the {@code first} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjCharToDoubleFunction<T, U> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjCharToDoubleFunction.java
/** * Creates a {@link BiObjCharToDoubleFunction} which uses the {@code second} parameter of this one as argument for * the given {@link ToDoubleFunction}./*from w w w .j a va 2s . c o m*/ * * @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 second} parameter of this one * @return Creates a {@code BiObjCharToDoubleFunction} which uses the {@code second} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjCharToDoubleFunction<T, U> onlySecond(@Nonnull final ToDoubleFunction<? super U> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(u); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjFloatToDoubleFunction.java
/** * Creates a {@link BiObjFloatToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./* ww w . ja v a 2 s. co m*/ * * @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 first} parameter of this one * @return Creates a {@code BiObjFloatToDoubleFunction} which uses the {@code first} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjFloatToDoubleFunction<T, U> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjFloatToDoubleFunction.java
/** * Creates a {@link BiObjFloatToDoubleFunction} which uses the {@code second} parameter of this one as argument for * the given {@link ToDoubleFunction}.//from w w w . j a va 2s . com * * @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 second} parameter of this one * @return Creates a {@code BiObjFloatToDoubleFunction} which uses the {@code second} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjFloatToDoubleFunction<T, U> onlySecond(@Nonnull final ToDoubleFunction<? super U> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(u); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjShortToDoubleFunction.java
/** * Creates a {@link BiObjShortToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./*from ww w . ja v a2s. c o m*/ * * @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 first} parameter of this one * @return Creates a {@code BiObjShortToDoubleFunction} which uses the {@code first} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjShortToDoubleFunction<T, U> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.BiObjShortToDoubleFunction.java
/** * Creates a {@link BiObjShortToDoubleFunction} which uses the {@code second} parameter of this one as argument for * the given {@link ToDoubleFunction}.//from w ww. ja v a 2 s .c om * * @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 second} parameter of this one * @return Creates a {@code BiObjShortToDoubleFunction} which uses the {@code second} parameter of this one as * argument for the given {@code ToDoubleFunction}. * @throws NullPointerException If given argument is {@code null} */ @Nonnull static <T, U> BiObjShortToDoubleFunction<T, U> onlySecond(@Nonnull final ToDoubleFunction<? super U> function) { Objects.requireNonNull(function); return (t, u, value) -> function.applyAsDouble(u); }