/SimpleRxJavaDemo

Primary LanguageJavaMIT LicenseMIT

SimpleRxJavaDemo

In this demo project i have created following activities.

  • SimpleObserverObservableActivity
    This activity represents Observer and Observable simple example where a list of task is iterated and filtered. Then they are displayed in onNext() method.

  • There are create operators who's job is to create Observables.

      create()
      just()
      range()
      repeat()
      interval()
      timer()
      fromArray()
      fromIterable()
      fromCallable()

  • ObserverObservableWithCreateOperatorsActivity
    This activity represents an example of create() operator. Where in a for loop is executed in background thread and then task is oberved on main thread.

  • ObserverObservableWithJustOperatorsActivity
    This activity represents an example of just() operator. Where just operator accepts maximum array of 10 lenght you can also pass multiple strings upto 10 length. In this example is have just passed a single object of task.

  • ObserverObservableWithRangeOperatorsActivity
    This activity represents an example of range() operator. In create() operator i had used a for loop to print all task in main thread but when using range() operator makes it simple i have also used map.
  • ObserverObservableWithRepeatOperatorsActivity
    This activity represents an example of repeat() operator. Where range is repeated multiple times.

  • ObserverObservableWithIntervalOperatorActivity
    This activity represents an example of interval() operator. Where it returns infinite sequence of ascending integers, with a constant interval of time of your choosing between emissions. Therefore takeWhile() is used to stop it.

  • ObserverObservableWithTimerOperatorActivity
    This activity represents an example of timer() operator. It is fired at specific time for single time(only once).

  • ObserverObservableWithFromArrayOperatorActivity
    This activity represents an example of fromArray() operator. It accepst accepts T[].

  • SimpleObserverObservableActivity(to see fromIterable example)
    This activity represents an example of fromArray() operator. It accepst accepts List<T>, ArrayList<T>, Set<T>, etc...

  • ObserverObservableWithFromCallableOperatorActivity
    This activity represents an example of fromCallable() operator. This operator can be helpful in retriving data from database though i have used new object and returned it. It can accept single object Callable<T> as well as List Callable<List<T>>.