Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Optional<BigDecimal> max = Optional.empty();
if (!this.itemsFiltered.isEmpty()) {//check if list is not empty
max =
.map(a -> a.getPrecioVentaNuevo())
if (max.isPresent()) {
Utilidades.Error("maxOptional:" + max);//prints optional value
Utilidades.Error("maxValue:" + max.get());//prints real value if any found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.