blob: 9dbcce804b1bb57d79088e84c273729e95885f2b [file]
package mapping;
import one.util.streamex.StreamEx;
public class MapFirstOrElse {
public static void main(String[] args) {
// Breakpoint!
final int max = StreamEx.of(1, 2, 3).mapFirstOrElse(x -> 10, x -> 20).max(Integer::compareTo).get();
System.out.println(max);
}
}