当前位置: 首页>>代码示例>>Java>>正文


Java LongToDoubleFunction.applyAsDouble方法代码示例

本文整理汇总了Java中java.util.function.LongToDoubleFunction.applyAsDouble方法的典型用法代码示例。如果您正苦于以下问题:Java LongToDoubleFunction.applyAsDouble方法的具体用法?Java LongToDoubleFunction.applyAsDouble怎么用?Java LongToDoubleFunction.applyAsDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.function.LongToDoubleFunction的用法示例。


在下文中一共展示了LongToDoubleFunction.applyAsDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: call

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
@Override
        public double[] call() throws Exception {
            double[] output = new double[size];
            LongToDoubleFunction mapper = RealDistributions.forSpec(mapperSpec);
//            System.out.println("resolved:" + mapper);
//            System.out.flush();

            synchronized (signal) {
                signal.wait(10000);
            }

            for (int i = 0; i < output.length; i++) {
                output[i] = mapper.applyAsDouble(i);
//                if ((i % 100) == 0) {
//                    System.out.println("wrote t:" + slot + ", iter:" + i + ", val:" + output[i]);
//                }
            }
            return output;
        }
 
开发者ID:virtualdataset,项目名称:metagen-java,代码行数:20,代码来源:RealDistributionsConcurrencyTests.java

示例2: F

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
F(LongToDoubleFunction longToDoubleFunction) {
    this((Function<T, R>) new Function<Long, Double>() {
        @Override
        public Double apply(Long t) {
            return longToDoubleFunction.applyAsDouble(t);
        }
    });
}
 
开发者ID:codebulb,项目名称:LambdaOmega,代码行数:9,代码来源:F.java

示例3: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link BiBooleanToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code BiBooleanToDoubleFunction} 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
 * double}.
 */
@Nonnull
default BiBooleanToDoubleFunction andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsDouble(applyAsLong(value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:BiBooleanToLongFunction.java

示例4: onlyThird

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Creates a {@link TriLongToDoubleFunction} which uses the {@code third} parameter of this one as argument for the
 * given {@link LongToDoubleFunction}.
 *
 * @param function The function which accepts the {@code third} parameter of this one
 * @return Creates a {@code TriLongToDoubleFunction} which uses the {@code third} parameter of this one as argument
 * for the given {@code LongToDoubleFunction}.
 * @throws NullPointerException If given argument is {@code null}
 */
@Nonnull
static TriLongToDoubleFunction onlyThird(@Nonnull final LongToDoubleFunction function) {
    Objects.requireNonNull(function);
    return (value1, value2, value3) -> function.applyAsDouble(value3);
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:15,代码来源:TriLongToDoubleFunction.java

示例5: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjIntToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjIntToDoubleFunction} 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
 * double}.
 */
@Nonnull
default ObjIntToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (t, value) -> after.applyAsDouble(applyAsLong(t, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjIntToLongFunction.java

示例6: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link BiByteToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code BiByteToDoubleFunction} 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
 * double}.
 */
@Nonnull
default BiByteToDoubleFunction andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2) -> after.applyAsDouble(applyAsLong(value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:BiByteToLongFunction.java

示例7: onlySecond

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Creates a {@link ObjBiLongToDoubleFunction} which uses the {@code second} parameter of this one as argument for
 * the given {@link LongToDoubleFunction}.
 *
 * @param <T> The type of the first argument to the function
 * @param function The function which accepts the {@code second} parameter of this one
 * @return Creates a {@code ObjBiLongToDoubleFunction} which uses the {@code second} parameter of this one as
 * argument for the given {@code LongToDoubleFunction}.
 * @throws NullPointerException If given argument is {@code null}
 */
@Nonnull
static <T> ObjBiLongToDoubleFunction<T> onlySecond(@Nonnull final LongToDoubleFunction function) {
    Objects.requireNonNull(function);
    return (t, value1, value2) -> function.applyAsDouble(value1);
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:16,代码来源:ObjBiLongToDoubleFunction.java

示例8: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link TriFloatToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code TriFloatToDoubleFunction} 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
 * double}.
 */
@Nonnull
default TriFloatToDoubleFunction andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (value1, value2, value3) -> after.applyAsDouble(applyAsLong(value1, value2, value3));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:TriFloatToLongFunction.java

示例9: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjBiCharToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjBiCharToDoubleFunction} 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
 * double}.
 */
@Nonnull
default ObjBiCharToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (t, value1, value2) -> after.applyAsDouble(applyAsLong(t, value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjBiCharToLongFunction.java

示例10: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjBiDoubleToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjBiDoubleToDoubleFunction} 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
 * double}.
 */
@Nonnull
default ObjBiDoubleToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (t, value1, value2) -> after.applyAsDouble(applyAsLong(t, value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjBiDoubleToLongFunction.java

示例11: onlyFirst

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Creates a {@link BiLongToDoubleFunction} which uses the {@code first} parameter of this one as argument for the
 * given {@link LongToDoubleFunction}.
 *
 * @param function The function which accepts the {@code first} parameter of this one
 * @return Creates a {@code BiLongToDoubleFunction} which uses the {@code first} parameter of this one as argument
 * for the given {@code LongToDoubleFunction}.
 * @throws NullPointerException If given argument is {@code null}
 */
@Nonnull
static BiLongToDoubleFunction onlyFirst(@Nonnull final LongToDoubleFunction function) {
    Objects.requireNonNull(function);
    return (value1, value2) -> function.applyAsDouble(value1);
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:15,代码来源:BiLongToDoubleFunction.java

示例12: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link CharToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code CharToDoubleFunction} 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
 * double}.
 */
@Nonnull
default CharToDoubleFunction andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (value) -> after.applyAsDouble(applyAsLong(value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:CharToLongFunction.java

示例13: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link BiObjIntToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code BiObjIntToDoubleFunction} 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
 * double}.
 */
@Nonnull
default BiObjIntToDoubleFunction<T, U> andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (t, u, value) -> after.applyAsDouble(applyAsLong(t, u, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:BiObjIntToLongFunction.java

示例14: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link ObjBiShortToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code ObjBiShortToDoubleFunction} 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
 * double}.
 */
@Nonnull
default ObjBiShortToDoubleFunction<T> andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (t, value1, value2) -> after.applyAsDouble(applyAsLong(t, value1, value2));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:ObjBiShortToLongFunction.java

示例15: andThenToDouble

import java.util.function.LongToDoubleFunction; //导入方法依赖的package包/类
/**
 * Returns a composed {@link BiObjFloatToDoubleFunction} 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 double}.
 *
 * @param after The function to apply after this function is applied
 * @return A composed {@code BiObjFloatToDoubleFunction} 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
 * double}.
 */
@Nonnull
default BiObjFloatToDoubleFunction<T, U> andThenToDouble(@Nonnull final LongToDoubleFunction after) {
    Objects.requireNonNull(after);
    return (t, u, value) -> after.applyAsDouble(applyAsLong(t, u, value));
}
 
开发者ID:gridtec,项目名称:lambda4j,代码行数:19,代码来源:BiObjFloatToLongFunction.java


注:本文中的java.util.function.LongToDoubleFunction.applyAsDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。