Exemple #1
0
 @Override
 public void apply(T param) {
   try {
     action.apply(param);
   } catch (Throwable t) {
     throw new ExceptionWrapper(t);
   }
 }
Exemple #2
0
 @Override
 public Option<T> map(CheckedAction<T> function) {
   if (isDefined()) {
     try {
       function.apply(get());
       return Option.maybe(get());
     } catch (Throwable t) {
       return Option.none();
     }
   }
   return Option.none();
 }