/** * Returns a {@code DoubleCollector} which partitions the input elements * according to a {@code DoublePredicate}, and organizes them into a * {@code Map<Boolean, double[]>}. * * There are no guarantees on the type, mutability, serializability, or * thread-safety of the {@code Map} returned. * * @param predicate a predicate used for classifying input elements * @return a {@code DoubleCollector} implementing the partitioning operation */ static DoubleCollector<?, Map<Boolean, double[]>> partitioningBy(DoublePredicate predicate) { return partitioningBy(predicate, toArray()); }