class Guavate {

  public static <T> Optional<T> tryCatchToOptional(Supplier<T> supplier) {
    try {
      return Optional.ofNullable(supplier.get());
    } catch (RuntimeException ex) {
      return Optional.empty();
    }
  }

  private  Guavate();

}