RxOptional extends Maybe<T> { public RxOptional<T> or(T anotherValue) { if (value == null) { return new RxOptional<>(anotherValue); } return this; } private  RxOptional(); private  RxOptional(T value); static RxOptional<T> maybe(T value); @SuppressWarnings("unchecked") static RxOptional<T> empty(); RxOptional<T> or(T anotherValue); Observable<U> flatten(Function<T, Iterable<? extends U>> mapper); T get(); @Nonnull RxOptional<T> ifPresent(@Nonnull Consumer<T> consumer); @Nonnull RxOptional<T> ifNotPresent(@Nonnull Action action); @Nonnull RxOptional<T> mapIfNotPresent(@Nonnull Supplier<T> supplier); @Nonnull RxOptional<R> mapIfPresent(@Nonnull Function<T, R> function); @Nonnull RxOptional<T> flatMapIfNotPresent(@Nonnull Supplier<RxOptional<T>> supplier); @Nonnull RxOptional<R> flatMapIfPresent(@Nonnull Function<T, RxOptional<R>> function);  }
@Test public void or() { assertEquals("1", RxOptional.maybe(null).or("1").get()); }