OptionalDouble
Class OptionalDouble
- java.lang.Object
-
- java.util.OptionalDouble
public final class OptionalDouble extends Object
A container object which may or may not contain a double
value. If a value is present, isPresent()
will return true
and getAsDouble()
will return the value.
Additional methods that depend on the presence or absence of a contained value are provided, such as orElse()
(return a default value if value not present) and ifPresent()
(execute a block of code if the value is present).
This is a valu