cyclops.reactive.ObservableCollections Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cyclops-rx2-integration Show documentation
Show all versions of cyclops-rx2-integration Show documentation
Cyclops integration with RxJava 2
package cyclops.reactive;
import cyclops.reactive.collections.immutable.BagX;
import cyclops.reactive.collections.immutable.LinkedListX;
import cyclops.reactive.collections.immutable.OrderedSetX;
import cyclops.reactive.collections.immutable.PersistentQueueX;
import cyclops.reactive.collections.immutable.PersistentSetX;
import cyclops.reactive.collections.immutable.VectorX;
import cyclops.reactive.collections.mutable.DequeX;
import cyclops.reactive.collections.mutable.ListX;
import cyclops.reactive.collections.mutable.QueueX;
import cyclops.reactive.collections.mutable.SetX;
import cyclops.reactive.collections.mutable.SortedSetX;
import io.reactivex.Observable;
/*
Factory methods for asynchronously populating Reactive Collections via Observables
*/
public interface ObservableCollections {
static LinkedListX linkedListX(Observable observable){
return LinkedListX.linkedListX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static VectorX vectorX(Observable observable){
return VectorX.vectorX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static PersistentSetX persistentSetX(Observable observable){
return PersistentSetX.persistentSetX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static OrderedSetX orderedSetX(Observable observable){
return OrderedSetX.orderedSetX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static BagX bagX(Observable observable){
return BagX.bagX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static PersistentQueueX persistentQueueX(Observable observable){
return PersistentQueueX.persistentQueueX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static ListX listX(Observable observable){
return ListX.listX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static DequeX dequeX(Observable observable){
return DequeX.dequeX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static SetX setX(Observable observable){
return SetX.setX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static SortedSetX sortedSetX(Observable observable){
return SortedSetX.sortedSetX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
static QueueX queueX(Observable observable){
return QueueX.queueX(ObservableReactiveSeq.reactiveSeq(observable)).materialize();
}
}