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

cyclops.reactive.ObservableCollections Maven / Gradle / Ivy

There is a newer version: 10.4.0
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy