1 package com.github.davidmoten.rx2;
2
3 import io.reactivex.Maybe;
4
5 public final class Maybes {
6
7 private Maybes() {
8 // prevent instantiation
9 }
10
11 public static <T> Maybe<T> fromNullable(T t) {
12 if (t == null) {
13 return Maybe.empty();
14 } else {
15 return Maybe.just(t);
16 }
17 }
18
19 }