All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pushtorefresh.storio.internal.ChangesBus Maven / Gradle / Ivy

There is a newer version: 1.13.0
Show newest version
package com.pushtorefresh.storio.internal;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import rx.Observable;

import static com.pushtorefresh.storio.internal.Environment.RX_JAVA_IS_AVAILABLE;

/**
 * FOR INTERNAL USAGE ONLY.
 * 

* Thread-safe changes bus. */ public final class ChangesBus { @Nullable private final RxChangesBus rxChangesBus = RX_JAVA_IS_AVAILABLE ? new RxChangesBus() : null; public void onNext(@NonNull T next) { if (rxChangesBus != null) { rxChangesBus.onNext(next); } } @Nullable public Observable asObservable() { return rxChangesBus != null ? rxChangesBus.asObservable() : null; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy