接口的使用
java.util.function.IntBinaryOperator
使用 IntBinaryOperator 的包
包
描述
包含集合框架、一些国际化支持类、服务加载器、属性、随机数生成、字符串解析和扫描类、base64 编码和解码、位数组和几个杂项实用程序类。
通常在并发编程中有用的实用程序类。
支持对单个变量进行无锁线程安全编程的小型类工具包。
支持对元素流进行函数式操作的类,例如对集合的 map-reduce 转换。
-
IntBinaryOperator 在 java.util 中的用法
java.util 中的方法,参数类型为 IntBinaryOperator修饰符和类型方法描述static voidArrays.parallelPrefix(int[] array, int fromIndex, int toIndex, IntBinaryOperator op) 对数组的给定子范围执行Arrays.parallelPrefix(int[], IntBinaryOperator)。static voidArrays.parallelPrefix(int[] array, IntBinaryOperator op) 使用提供的函数并行地累积给定数组的每个元素。 -
IntBinaryOperator 在 java.util.concurrent 中的用法
java.util.concurrent 中的方法,参数类型为 IntBinaryOperator修饰符和类型方法描述intConcurrentHashMap.reduceEntriesToInt(long parallelismThreshold, ToIntFunction<Map.Entry<K, V>> transformer, int basis, IntBinaryOperator reducer) 返回使用给定的 reducer 组合值的所有条目的给定转换的累加结果,并将给定的基础作为标识值。intConcurrentHashMap.reduceKeysToInt(long parallelismThreshold, ToIntFunction<? super K> transformer, int basis, IntBinaryOperator reducer) 返回使用给定的 reducer 将所有键的给定转换累积起来以组合值的结果,并将给定的基作为标识值。intConcurrentHashMap.reduceToInt(long parallelismThreshold, ToIntBiFunction<? super K, ? super V> transformer, int basis, IntBinaryOperator reducer) 返回使用给定的 reducer 对所有 (key, value) 对的给定转换进行累加以组合值的结果,并将给定的基作为标识值。intConcurrentHashMap.reduceValuesToInt(long parallelismThreshold, ToIntFunction<? super V> transformer, int basis, IntBinaryOperator reducer) 返回使用给定的 reducer 将所有值的给定转换累积起来以组合值的结果,并将给定的基础作为标识值。 -
IntBinaryOperator 在 java.util.concurrent.atomic 中的用法
java.util.concurrent.atomic 中的方法,参数类型为 IntBinaryOperator修饰符和类型方法描述final intAtomicInteger.accumulateAndGet(int x, IntBinaryOperator accumulatorFunction) 以原子方式更新(具有VarHandle.compareAndSet(java.lang.Object...)指定的记忆效应)当前值以及将给定函数应用于当前值和给定值的结果,并返回更新后的值。final intAtomicIntegerArray.accumulateAndGet(int i, int x, IntBinaryOperator accumulatorFunction) 使用给定函数应用于当前值和给定值的结果原子地更新(具有VarHandle.compareAndSet(java.lang.Object...)指定的记忆效应)索引i处的元素,返回更新后的值。final intAtomicIntegerFieldUpdater.accumulateAndGet(T obj, int x, IntBinaryOperator accumulatorFunction) 以原子方式更新(具有VarHandle.compareAndSet(java.lang.Object...)指定的记忆效应)由该更新程序管理的给定对象的字段,以及将给定函数应用于当前值和给定值的结果,返回更新后的值。final intAtomicInteger.getAndAccumulate(int x, IntBinaryOperator accumulatorFunction) 以原子方式更新(具有VarHandle.compareAndSet(java.lang.Object...)指定的记忆效应)当前值以及将给定函数应用于当前值和给定值的结果,并返回先前的值。final intAtomicIntegerArray.getAndAccumulate(int i, int x, IntBinaryOperator accumulatorFunction) 以原子方式更新(具有VarHandle.compareAndSet(java.lang.Object...)指定的记忆效应)索引i处的元素,其结果为将给定函数应用于当前值和给定值,返回先前值。final intAtomicIntegerFieldUpdater.getAndAccumulate(T obj, int x, IntBinaryOperator accumulatorFunction) 原子地更新(具有VarHandle.compareAndSet(java.lang.Object...)指定的记忆效应)由该更新程序管理的给定对象的字段,其结果是将给定函数应用于当前值和给定值,返回先前的值。 -
IntBinaryOperator 在 java.util.stream 中的用法
java.util.stream 中的方法,参数类型为 IntBinaryOperator修饰符和类型方法描述intIntStream.reduce(int identity, IntBinaryOperator op) IntStream.reduce(IntBinaryOperator op)