orElseGet abstract method

T orElseGet(
  1. T supply()
)

Returns this Optional's value, if present. Otherwise, returns the result of calling supply().

Implementation

T orElseGet(T Function() supply);