Is there a (elegant) way to define a min / max lambda expression?
public class MathFunction{
private java.util.function.Function <double[], Double> function = null;
public MathFunction ( Function <double[], Double> pFunction ){
this.function = pFunction;
}
}
MathFunction func = new MathFunction((x) -> min(x));
Of course, it min(x)does n’t work . I need a way to sort an array on the fly.
source
share