Uses of Interface
java.util.function.ToIntFunction
Package
Description
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
Utility classes commonly useful in concurrent programming.
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
-
Uses of ToIntFunction in java.util
Modifier and TypeMethodDescriptionstatic <T> Comparator
<T> Comparator.comparingInt
(ToIntFunction<? super T> keyExtractor) Accepts a function that extracts anint
sort key from a typeT
, and returns aComparator<T>
that compares by that sort key.default Comparator
<T> Comparator.thenComparingInt
(ToIntFunction<? super T> keyExtractor) Returns a lexicographic-order comparator with a function that extracts anint
sort key. -
Uses of ToIntFunction in java.util.concurrent
Modifier and TypeMethodDescriptionint
ConcurrentHashMap.reduceEntriesToInt
(long parallelismThreshold, ToIntFunction<Map.Entry<K, V>> transformer, int basis, IntBinaryOperator reducer) Returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value.int
ConcurrentHashMap.reduceKeysToInt
(long parallelismThreshold, ToIntFunction<? super K> transformer, int basis, IntBinaryOperator reducer) Returns the result of accumulating the given transformation of all keys using the given reducer to combine values, and the given basis as an identity value.int
ConcurrentHashMap.reduceValuesToInt
(long parallelismThreshold, ToIntFunction<? super V> transformer, int basis, IntBinaryOperator reducer) Returns the result of accumulating the given transformation of all values using the given reducer to combine values, and the given basis as an identity value. -
Uses of ToIntFunction in java.util.stream
Modifier and TypeMethodDescriptionCollectors.averagingInt
(ToIntFunction<? super T> mapper) Returns aCollector
that produces the arithmetic mean of an integer-valued function applied to the input elements.Stream.mapToInt
(ToIntFunction<? super T> mapper) Returns anIntStream
consisting of the results of applying the given function to the elements of this stream.static <T> Collector
<T, ?, IntSummaryStatistics> Collectors.summarizingInt
(ToIntFunction<? super T> mapper) Returns aCollector
which applies anint
-producing mapping function to each input element, and returns summary statistics for the resulting values.Collectors.summingInt
(ToIntFunction<? super T> mapper) Returns aCollector
that produces the sum of an integer-valued function applied to the input elements.