Uses of Interface java.util.function.ToLongFunction (Java SE 14 & JDK 14)
Description: use: module: java.base, package: java.util.function, interface: ToLongFunction

# Uses of Interface
java.util.function.ToLongFunction

Packages that use ToLongFunction
Package | Description
--- | ---
java.util | 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.
java.util.concurrent | Utility classes commonly useful in concurrent programming.
java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- ## Uses of ToLongFunction in java.util

  Methods in java.util with parameters of type ToLongFunction
  Modifier and Type | Method | Description
  --- | --- | ---
  `static <T> Comparator<T>` | Comparator.`comparingLong​(ToLongFunction<? super T> keyExtractor)` | Accepts a function that extracts a `long` sort key from a type `T`, and returns a `Comparator<T>` that compares by that sort key.
  `default Comparator<T>` | Comparator.`thenComparingLong​(ToLongFunction<? super T> keyExtractor)` | Returns a lexicographic-order comparator with a function that extracts a `long` sort key.

- ## Uses of ToLongFunction in java.util.concurrent

  Methods in java.util.concurrent with parameters of type ToLongFunction
  Modifier and Type | Method | Description
  --- | --- | ---
  `long` | ConcurrentHashMap.`reduceEntriesToLong​(long parallelismThreshold, ToLongFunction<Map.Entry<K,​V>> transformer, long basis, LongBinaryOperator 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.
  `long` | ConcurrentHashMap.`reduceKeysToLong​(long parallelismThreshold, ToLongFunction<? super K> transformer, long basis, LongBinaryOperator 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.
  `long` | ConcurrentHashMap.`reduceValuesToLong​(long parallelismThreshold, ToLongFunction<? super V> transformer, long basis, LongBinaryOperator 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 ToLongFunction in java.util.stream

  Methods in java.util.stream with parameters of type ToLongFunction
  Modifier and Type | Method | Description
  --- | --- | ---
  `static <T> Collector<T,​?,​Double>` | Collectors.`averagingLong​(ToLongFunction<? super T> mapper)` | Returns a `Collector` that produces the arithmetic mean of a long-valued function applied to the input elements.
  `LongStream` | Stream.`mapToLong​(ToLongFunction<? super T> mapper)` | Returns a `LongStream` consisting of the results of applying the given function to the elements of this stream.
  `static <T> Collector<T,​?,​LongSummaryStatistics>` | Collectors.`summarizingLong​(ToLongFunction<? super T> mapper)` | Returns a `Collector` which applies an `long`-producing mapping function to each input element, and returns summary statistics for the resulting values.
  `static <T> Collector<T,​?,​Long>` | Collectors.`summingLong​(ToLongFunction<? super T> mapper)` | Returns a `Collector` that produces the sum of a long-valued function applied to the input elements.