public T orElseSupplier ( final Supplier < T > other ) { checkNotNull ( other , "orElse requires a non null supplier" ) ; if ( isPresent ( ) ) { return get ( ) ; } return other . get ( ) ; }
Return the value if present otherwise get the value from the Supplier .