/** * Return the value if present, otherwise return other. * * @param other the value to be returned if there is no value present, may be null * @return */ public T orElse(T other){ if(isPresent()){ return get(); } return other; }
/** * Return the value if present, otherwise return other. * * @param other the value to be returned if there is no value present, may be null * @return */ public T orElse(T other){ if(isPresent()){ return get(); } return other; }