I\'ve tested a bit the max function on Java 8 lambdas and streams, and it seems that in case max is executed, even if more than one object compares
max
System.out.println( Stream.of(1, 3, 5, 3, 2, 3, 5) .map(a->new Integer[]{a}) .reduce((a,b)-> a[0]==b[0]? Stream.concat(Stream.of(a),Stream.of(b)).toArray() : a[0]>b[0]? a:b ).get() )