Package | Description |
---|---|
java8.util |
Provides some of the new
java.util classes and implementations of
static and default interface methods added in Java 8 and, in addition, the
JEP 269: Convenience Factory
Methods for Collections that were introduced in Java 9. |
java8.util.stream |
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
|
Modifier and Type | Method and Description |
---|---|
static <T> Comparator<T> |
Comparators.comparingDouble(ToDoubleFunction<? super T> keyExtractor)
Accepts a function that extracts a
double sort key from a type
T , and returns a Comparator<T> that compares by that
sort key. |
static <T> Comparator<T> |
Comparators.thenComparingDouble(Comparator<? super T> this_,
ToDoubleFunction<? super T> keyExtractor)
Returns a lexicographic-order comparator with a function that
extracts a
double sort key. |
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,?,Double> |
Collectors.averagingDouble(ToDoubleFunction<? super T> mapper)
Returns a
Collector that produces the arithmetic mean of a double-valued
function applied to the input elements. |
DoubleStream |
Stream.mapToDouble(ToDoubleFunction<? super T> mapper)
Returns a
DoubleStream consisting of the results of applying the
given function to the elements of this stream. |
static <T> Collector<T,?,DoubleSummaryStatistics> |
Collectors.summarizingDouble(ToDoubleFunction<? super T> mapper)
Returns a
Collector which applies an double -producing
mapping function to each input element, and returns summary statistics
for the resulting values. |
static <T> Collector<T,?,Double> |
Collectors.summingDouble(ToDoubleFunction<? super T> mapper)
Returns a
Collector that produces the sum of a double-valued
function applied to the input elements. |
Copyright © 2018. All rights reserved.