List of usage examples for java.util.function ToDoubleFunction applyAsDouble
double applyAsDouble(T value);
From source file:at.gridtec.lambda4j.function.bi.obj.ObjFloatToDoubleFunction.java
/** * Creates a {@link ObjFloatToDoubleFunction} 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 . 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 ObjFloatToDoubleFunction} 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> ObjFloatToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjShortToDoubleFunction.java
/** * Creates a {@link ObjShortToDoubleFunction} which uses the {@code first} parameter of this one as argument for the * given {@link ToDoubleFunction}./*from w w w .jav a2 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 ObjShortToDoubleFunction} 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> ObjShortToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjIntToDoubleFunction.java
/** * Creates a {@link ObjIntToDoubleFunction} 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. c om*/ * * @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 ObjIntToDoubleFunction} 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> ObjIntToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.bi.obj.ObjLongToDoubleFunction.java
/** * Creates a {@link ObjLongToDoubleFunction} which uses the {@code first} parameter of this one as argument for the * given {@link ToDoubleFunction}.//w w w. j av a 2s . 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 ObjLongToDoubleFunction} 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> ObjLongToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value) -> function.applyAsDouble(t); }
From source file:at.gridtec.lambda4j.function.tri.obj.ObjBiBooleanToDoubleFunction.java
/** * Creates a {@link ObjBiBooleanToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./*www . j a v a 2 s .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 ObjBiBooleanToDoubleFunction} 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> ObjBiBooleanToDoubleFunction<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.ObjBiByteToDoubleFunction.java
/** * Creates a {@link ObjBiByteToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}.//from ww w.j a v a2 s . 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 ObjBiByteToDoubleFunction} 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> ObjBiByteToDoubleFunction<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.ObjBiCharToDoubleFunction.java
/** * Creates a {@link ObjBiCharToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}.//w ww . j a v a 2s . c om * * @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 ObjBiCharToDoubleFunction} 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> ObjBiCharToDoubleFunction<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.ObjBiDoubleToDoubleFunction.java
/** * Creates a {@link ObjBiDoubleToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}.// w ww . j av a 2 s .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 ObjBiDoubleToDoubleFunction} 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> ObjBiDoubleToDoubleFunction<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.ObjBiFloatToDoubleFunction.java
/** * Creates a {@link ObjBiFloatToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}.//ww w.ja va 2s . 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 ObjBiFloatToDoubleFunction} 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> ObjBiFloatToDoubleFunction<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.ObjBiShortToDoubleFunction.java
/** * Creates a {@link ObjBiShortToDoubleFunction} which uses the {@code first} parameter of this one as argument for * the given {@link ToDoubleFunction}./* w w w .ja v a 2 s. 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 ObjBiShortToDoubleFunction} 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> ObjBiShortToDoubleFunction<T> onlyFirst(@Nonnull final ToDoubleFunction<? super T> function) { Objects.requireNonNull(function); return (t, value1, value2) -> function.applyAsDouble(t); }