1 package com.github.davidmoten.rx;
2
3 import com.github.davidmoten.rx.Checked.A0;
4 import com.github.davidmoten.rx.Checked.A1;
5
6 import rx.functions.Action0;
7 import rx.functions.Action1;
8
9 public final class Ignore {
10
11 private Ignore() {
12
13 }
14
15 public static Action0 a0(final A0 a) {
16 return new Action0() {
17 @Override
18 public void call() {
19 try {
20 a.call();
21 } catch (Exception e) {
22
23 }
24 }
25 };
26 }
27
28 public static <T> Action1<T> a1(final A1<T> a) {
29 return new Action1<T>() {
30 @Override
31 public void call(T t) {
32 try {
33 a.call(t);
34 } catch (Exception e) {
35
36 }
37 }
38 };
39 }
40
41 }