Package org.drasyl.util
Class ObservableUtil
java.lang.Object
org.drasyl.util.ObservableUtil
Utility class for operations on 
Observables.- 
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.reactivex.rxjava3.core.Observable<Pair<T,T>> pairWithPreviousObservable(io.reactivex.rxjava3.core.Observable<T> observable) Creates anObservableto pair up the current and previous items. 
- 
Method Details
- 
pairWithPreviousObservable
public static <T> io.reactivex.rxjava3.core.Observable<Pair<T,T>> pairWithPreviousObservable(io.reactivex.rxjava3.core.Observable<T> observable) Creates anObservableto pair up the current and previous items.Source: +---+ +---+ +---+ --+ A +--+ B +--+ C +-> +---+ +---+ +---+ pairWithPreviousObservable: +---+ +---+ +---+ --+ A +--+ B +--+ C +-> | ⊥ | | A | | B | +---+ +---+ +---+
Adapted from http://www.zerobugbuild.com/?p=213- Type Parameters:
 T- the common element type- Parameters:
 observable-Observablewhose current and previous items are to be paired.- Returns:
 - the new 
Observableinstance 
 
 -