@FunctionalInterface public interface Merger
Provides a few obvious stateless examples.
Modifier and Type | Method and Description |
---|---|
static Merger |
add()
A merger which adds the elements.
|
static Merger |
max()
A merger which takes the maximum element.
|
double |
merge(double first,
double second)
Merges first and second.
|
static Merger |
min()
A merger which takes the minimum element.
|
double merge(double first, double second)
first
- The first input.second
- The second input.static Merger max()
static Merger min()
static Merger add()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.