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;

/**
 * FOR INTERNAL USAGE ONLY.
 * 

* Thread-safe changes bus. */ public final class ChangesBus { @Nullable private final RxChangesBus rxChangesBus; public ChangesBus(boolean rxJavaIsInTheClassPath) { rxChangesBus = rxJavaIsInTheClassPath ? 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