diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index 77196e2..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/deployment.xml b/.idea/deployment.xml
deleted file mode 100644
index 820375f..0000000
--- a/.idea/deployment.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index b26911b..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_beust_jcommander_1_27.xml b/.idea/libraries/Maven__com_beust_jcommander_1_27.xml
deleted file mode 100644
index f0f9060..0000000
--- a/.idea/libraries/Maven__com_beust_jcommander_1_27.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_reactivex_rxjava2_rxjava_2_0_0.xml b/.idea/libraries/Maven__io_reactivex_rxjava2_rxjava_2_0_0.xml
deleted file mode 100644
index 83a3f82..0000000
--- a/.idea/libraries/Maven__io_reactivex_rxjava2_rxjava_2_0_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_10.xml b/.idea/libraries/Maven__junit_junit_4_10.xml
deleted file mode 100644
index ed8bf5f..0000000
--- a/.idea/libraries/Maven__junit_junit_4_10.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml b/.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml
deleted file mode 100644
index d6f17aa..0000000
--- a/.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml
deleted file mode 100644
index acdf443..0000000
--- a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_0.xml b/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_0.xml
deleted file mode 100644
index afef071..0000000
--- a/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_testng_testng_6_8.xml b/.idea/libraries/Maven__org_testng_testng_6_8.xml
deleted file mode 100644
index 7d6214c..0000000
--- a/.idea/libraries/Maven__org_testng_testng_6_8.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml
deleted file mode 100644
index 0f8bd19..0000000
--- a/.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 233a7f0..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 8cf0a00..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/rxjava2parallel.iml b/.idea/rxjava2parallel.iml
deleted file mode 100644
index 6c1bcab..0000000
--- a/.idea/rxjava2parallel.iml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index e96534f..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index da7d8ca..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,1567 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- DEFINITION_ORDER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- project
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1479036011878
-
-
- 1479036011878
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1479315394330
-
-
-
- 1479315394330
-
-
- 1480355712759
-
-
-
- 1480355712759
-
-
- 1480355863487
-
-
-
- 1480355863487
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No facets are configured
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1.8
-
-
-
-
-
-
-
-
-
-
-
- rxjava2
-
-
-
-
-
-
-
-
-
-
-
-
- 1.8
-
-
-
-
-
-
-
-
-
-
-
- Maven: io.reactivex.rxjava2:rxjava:2.0.0
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..da71872
--- /dev/null
+++ b/index.html
@@ -0,0 +1,57 @@
+
+
+
+
+ Rxjava2parallel by frhack
+
+
+
+
+
+
+
+
+
+
+
+ Welcome to GitHub Pages.
+
+This automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown , select a template crafted by a designer, and publish. After your page is generated, you can check out the new gh-pages branch locally. If you’re using GitHub Desktop, simply sync your repository and you’ll see the new branch.
+
+
+ Designer Templates
+
+We’ve crafted some handsome templates for you to use. Go ahead and click 'Continue to layouts' to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved.
+
+
+ Creating pages manually
+
+If you prefer to not use the automatic generator, push a branch named gh-pages to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.
+
+
+ Authors and Contributors
+
+You can @mention a GitHub username to generate a link to their profile. The resulting <a> element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt ), PJ Hyett (@pjhyett ), and Tom Preston-Werner (@mojombo ) founded GitHub.
+
+
+ Support or Contact
+
+Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.
+
+
+
+
+
+
+
+
diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js
new file mode 100644
index 0000000..87a40ca
--- /dev/null
+++ b/javascripts/scale.fix.js
@@ -0,0 +1,17 @@
+var metas = document.getElementsByTagName('meta');
+var i;
+if (navigator.userAgent.match(/iPhone/i)) {
+ for (i=0; i` element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.\r\n\r\n### Support or Contact\r\nHaving trouble with Pages? Check out our [documentation](https://help.github.com/pages) or [contact support](https://github.com/contact) and we’ll help you sort it out.\r\n",
+ "note": "Don't delete this file! It's used internally to help with page regeneration."
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 7ea358f..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- 1.8
- 1.8
- UTF-8
- UTF-8
-
- 4.0.0
-
-
- rxjava2
- rxjava2
- 1.0-SNAPSHOT
-
-
-
-
- io.reactivex.rxjava2
- rxjava
- 2.0.0
-
-
- org.testng
- testng
- 6.8
-
-
-
-
-
\ No newline at end of file
diff --git a/rxjava2parallel.iml b/rxjava2parallel.iml
deleted file mode 100644
index 6c1bcab..0000000
--- a/rxjava2parallel.iml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/org/teepee/parallelobservable/ParallelObservable.java b/src/main/java/org/teepee/parallelobservable/ParallelObservable.java
deleted file mode 100644
index c18cf5a..0000000
--- a/src/main/java/org/teepee/parallelobservable/ParallelObservable.java
+++ /dev/null
@@ -1,551 +0,0 @@
-package org.teepee.parallelobservable;
-
-import io.reactivex.Observable;
-import io.reactivex.ObservableEmitter;
-import io.reactivex.ObservableOnSubscribe;
-import io.reactivex.functions.Consumer;
-import io.reactivex.functions.Function;
-import io.reactivex.functions.Predicate;
-import javafx.util.Pair;
-import org.teepee.parallelobservable.operators.Take;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.*;
-
-import static java.lang.Thread.sleep;
-
-/**
- * Created by francesco on 13/11/2016.
- */
-public class ParallelObservable {
- private ExecutorService executorService;
- private Observable observable;
- private Integer bufferSize;
- private Integer threadsPoolSize;
- private boolean serialized = false;
- BlockingQueue tqueue;
-
- public ParallelObservable(Observable observable) {
- this.observable = observable;
- this.threadsPoolSize = Runtime.getRuntime().availableProcessors() + 1;
- }
-
-
- public Observable observable() {
- return observable;
- }
-
-
- public ParallelObservable withBuffer(Integer bufferSize) {
- ParallelObservable p = getNew(observable);
- p.bufferSize = bufferSize;
- return p;
- }
-
- public ParallelObservable unparallel() {
- return withThreads(0);
- }
-
-
- public ParallelObservable withThreads(Integer threadsPoolSize) {
- ParallelObservable p = getNew(observable);
- p.threadsPoolSize = threadsPoolSize;
- return p;
- }
-
-
- public static ParallelObservable fromIterable(Iterable extends T> source) {
- return new ParallelObservable(Observable.fromIterable(source));
- }
-
- public static ParallelObservable fromObservable(Observable source) {
- return new ParallelObservable<>(source);
- }
-
-
- public static ParallelObservable range(int start, int count) {
- return new ParallelObservable<>(Observable.range(start, count));
- }
-
- public ParallelObservable doOnNext(Consumer super T> fun) {
- if (threadsPoolSize == 0) return getNewBufferedIfNeeded(observable.doOnNext(fun));
- ParallelObservable p;
- if (bufferSize == null) {
- p = getDoOnNextObservable(fun);
- } else {
- p = getDoOnNextObservableBuffered(fun);
- }
- return p;
- }
-
- public ParallelObservable take(long n) {
- return new Take<>(this, n);
- }
-
- public ParallelObservable takeWhile(Predicate super T> predicate) {
- return this.map((T t) -> {
- Pair pair = new Pair(t, predicate.test(t));
- return pair;
- }).unparallelTtakeWhile((Pair pair) -> pair.getValue()).map((Pair pair) -> pair.getKey());
- //return new ParallelObservable<>(new ObservableTakeWhile(observable(),predicate));
- }
-
-
- public ParallelObservable unparallelTtakeWhile(Predicate super T> fun) {
- return getNew(observable.takeWhile(fun));
- }
-
-
- public ParallelObservable takeUntil(Predicate super T> predicate) {
- return this.map((T t) -> {
- Pair pair = new Pair(t, predicate.test(t));
- return pair;
- }).unparallelTtakeUntil((Pair pair) -> pair.getValue()).map((Pair pair) -> pair.getKey());
- }
-
- public ParallelObservable unparallelTtakeUntil(Predicate super T> fun) {
- return getNew(observable.takeUntil(fun));
- }
-
-
- public Observable serialObservable() {
- if (serialized) return observable;
- return observable.serialize();
- //return new ToObservable(this).observable();
- }
-
-
- public ParallelObservable serialize() {
- if (serialized) return this;
- ParallelObservable po = getNew(observable.serialize());
- po.serialized = true;
- return po;
- }
-
-
- public ParallelObservable filter(Predicate super T> fun) {
- ParallelObservable o;
- if (threadsPoolSize == 0) return getNewBufferedIfNeeded(observable.filter(fun));
- if (bufferSize == null) {
- o = getFilterParallelObservable(fun);
- } else {
- o = getFilterParallelObservableBuffered(fun);
- }
- return o;
- }
-
-
- public final ParallelObservable map(Function super T, ? extends R> fun) {
- ParallelObservable o;
- if (threadsPoolSize == 0) {
- return getNewBufferedIfNeeded(observable.map(fun));
- }
- if (bufferSize == null) {
- o = getMapParallelObservable(fun);
- } else {
- o = getMapParallelObservableBuffered(fun);
- }
- return o;
- }
-
-
- private ParallelObservable getMapParallelObservable(Function super T, ? extends R> fun) {
- Observable o = Observable.create(e -> {
-
- initExecutorService();
- observable.forEachWhile((T t) -> {
- submitMap(t, fun, e);
- return !e.isDisposed();
- }
- );
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- e.onComplete();
- });
- return new ParallelObservable(o);
- }
-
-
- private ParallelObservable getDoOnNextObservableNEW(Consumer super T> fun) {
- Observable o = Observable.create(e -> {
- initExecutorService();
- System.out.println("XXX LLL" + e.isDisposed());
- observable.doOnNext((T t) -> {
- System.out.println("XXX AAAA LLL" + e.isDisposed());
- submit(t, fun, e);
- ;
- });
- observable.doOnComplete(() -> {
- System.out.println("XXX COMPLETE");
- e.onComplete();
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- });
- //e.onComplete();
- }
-
-
- );
-// o.doOnComplete(()->e.onComplete());
- return getNew(o);
- }
-
-
- private ParallelObservable getDoOnNextObservable(Consumer super T> fun) {
- Observable o = Observable.create(e -> {
-
- initExecutorService();
- observable.forEachWhile((T t) -> {
- submit(t, fun, e);
- return !e.isDisposed();
- }
- );
- observable.doOnComplete(() -> {
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- e.onComplete();
- });
-
- });
- return getNew(o);
- }
-
-
- private ParallelObservable getMapParallelObservableBuffered(Function super T, ? extends R> fun) {
- Observable o = Observable.create(new ObservableOnSubscribe() {
- int bufferIndex = 0;
-
- @Override
- public void subscribe(ObservableEmitter e) {
- initExecutorService();
- final List> buffer = new ArrayList>(bufferSize);
- observable.forEachWhile((T t) -> {
- submitMapBuffered(t, fun, e, buffer, bufferIndex);
- bufferIndex++;
- if (bufferIndex == bufferSize) {
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- for (int i = 0; i < bufferIndex; i++) {
- e.onNext(buffer.get(i).get());
- }
- bufferIndex = 0;
- initExecutorService();
- }
- return !e.isDisposed();
- }
- );
-
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- for (int i = 0; i < bufferIndex; i++) {
- try {
- e.onNext(buffer.get(i).get());
- } catch (Exception ex) {
- e.onError(ex);
- }
- }
- e.onComplete();
- }
- });
- return new ParallelObservable<>(o);
- }
-
-
- private ParallelObservable getDoOnNextObservableBuffered(Consumer super T> fun) {
- Observable o = Observable.create(new ObservableOnSubscribe() {
- int bufferIndex = 0;
-
- @Override
- public void subscribe(ObservableEmitter e) {
-
- initExecutorService();
- final List buffer = new ArrayList(bufferSize);
- observable.forEachWhile((T t) -> {
- submitBuffered(t, fun, e, buffer, bufferIndex);
- bufferIndex++;
- if (bufferIndex == bufferSize) {
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- for (int i = 0; i < bufferIndex; i++) {
- e.onNext(buffer.get(i));
- }
- bufferIndex = 0;
- initExecutorService();
- }
- return !e.isDisposed();
- }
- );
-
-
-
-
-
- observable.doOnComplete(() -> {
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- for (int i = 0; i < bufferIndex; i++) {
- e.onNext(buffer.get(i));
- }
- bufferIndex = 0;
- e.onComplete();
- });
-
-
- }
- });
- return getNew(o);
- }
-
-
- public void initExecutorService() {
- tqueue = new ArrayBlockingQueue<>(1000);
- Integer size = threadsPoolSize;
- //FIXME TODO
- RejectedExecutionHandler rejectedExecutionHandler = (r, executor) -> {
- try {
- sleep(0, 1000);
- tqueue.put(r);
- } catch (Exception e) {
- System.err.println(e);
- }
- };
-
- if (size == null) {
- size = Runtime.getRuntime().availableProcessors() + 1;
- }
- //executorService = Executors.newFixedThreadPool(threadsPoolSize);
- //System.out.println(parallelObservable + " " + size);
- executorService = new ThreadPoolExecutor(size, size,
- 0L, TimeUnit.MILLISECONDS,
- tqueue);
-
- }
-
-
- private void submit(T element, Consumer super T> fun, ObservableEmitter oe) {
- submitWaitIfNeeded();
- executorService.submit(() -> {
- try {
- fun.accept(element);
- oe.onNext(element);
- } catch (Exception e) {
- oe.onError(e);
- }
- });
- }
-
-
- private void submitFilter(T element, Predicate super T> fun, ObservableEmitter oe) {
- submitWaitIfNeeded();
- executorService.submit(() -> {
- try {
- if (fun.test(element)) {
- oe.onNext(element);
- }
- } catch (Exception e) {
- oe.onError(e);
- }
- });
- }
-
-
- private void submitWaitIfNeeded() {
- while (tqueue.size() > 900) {
- try {
- sleep(0, 100);
- } catch (Exception e) {
- }
- }
- }
-
- private void submitMap(T element, Function super T, ? extends R> fun, ObservableEmitter oe) throws Exception {
- submitWaitIfNeeded();
- executorService.submit(() -> {
- try {
- R r = fun.apply(element);
- oe.onNext(r);
- } catch (Exception e) {
- oe.onError(e);
- }
- });
- }
-
- private void submitMapBuffered(T element, Function super T, ? extends R> fun, ObservableEmitter oe, List> buffer, int bufferIndex) throws Exception {
- Future future;
- submitWaitIfNeeded();
- future = executorService.submit(() -> {
- R r = null;
- try {
- r = fun.apply(element);
-
- } catch (Exception e) {
- oe.onError(e);
- }
- return r;
- });
- if (buffer.size() <= bufferIndex) {
- buffer.add(future);
- } else {
- buffer.set(bufferIndex, future);
- }
- }
-
-
- private void submitBuffered(T element, Consumer super T> fun, ObservableEmitter oe, List buffer, int bufferIndex) throws Exception {
- submitWaitIfNeeded();
- executorService.submit(() -> {
- try {
- fun.accept(element);
- } catch (Exception e) {
- oe.onError(e);
- }
- });
- if (buffer.size() <= bufferIndex) {
- buffer.add(element);
- } else {
- buffer.set(bufferIndex, element);
- }
- }
-
- private ParallelObservable getFilterParallelObservable(Predicate super T> fun) {
- Observable o = Observable.create(e -> {
- initExecutorService();
- observable.forEachWhile((T t) -> {
- submitFilter(t, fun, e);
- return !e.isDisposed();
- }
- );
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- e.onComplete();
- });
- return new ParallelObservable<>(o);
- }
-
-
- private ParallelObservable getFilterParallelObservableBuffered(Predicate super T> fun) {
- Observable o = Observable.create(new ObservableOnSubscribe() {
- int bufferIndex = 0;
-
-
- @Override
- public void subscribe(ObservableEmitter e) {
- initExecutorService();
- final List>> buffer = new ArrayList<>(bufferSize);
- observable.forEachWhile((T t) -> {
- submitFilterBuffered(t, fun, e, buffer, bufferIndex);
- bufferIndex++;
- if (bufferIndex == bufferSize) {
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- for (int i = 0; i < bufferIndex; i++) {
- if (buffer.get(i).get().getValue())
- e.onNext(buffer.get(i).get().getKey());
- }
- bufferIndex = 0;
- initExecutorService();
- }
- return !e.isDisposed();
- }
- );
-
- executorService.shutdown();
- try {
- executorService.awaitTermination(3600, TimeUnit.SECONDS);
- } catch (Exception ee) {
- e.onError(ee);
- }
- for (int i = 0; i < bufferIndex; i++) {
- try {
- if (buffer.get(i).get().getValue())
- e.onNext(buffer.get(i).get().getKey());
- } catch (Exception ex) {
- e.onError(ex);
- }
- }
- e.onComplete();
- }
- });
- return new ParallelObservable<>(o);
- }
-
-
- public static Predicate super T> not(Predicate super T> predicate) {
- return (T t) -> !predicate.test(t);
- }
-
- private void submitFilterBuffered(T element, Predicate super T> fun, ObservableEmitter oe, List>> buffer, int bufferIndex) throws Exception {
- submitWaitIfNeeded();
- Future> future = executorService.submit(() -> {
- Boolean r = false;
- try {
- r = fun.test(element);
- } catch (Exception e) {
- oe.onError(e);
- }
- return new Pair<>(element, r);
- });
-
- if (buffer.size() <= bufferIndex) {
- buffer.add(future);
- } else {
- buffer.set(bufferIndex, future);
- }
- }
-
- private ParallelObservable getNew(Observable observable) {
- ParallelObservable parallelObservable = new ParallelObservable(observable);
- return parallelObservable;
- }
-
- private ParallelObservable getNewBufferedIfNeeded(Observable observable) {
- if (bufferSize != null) {
- return getNew(observable.buffer(bufferSize).flatMap(l -> Observable.fromIterable(l)));
- } else {
- return getNew(observable);
- }
- }
-
-
- public boolean isSerialized() {
- return serialized;
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/org/teepee/parallelobservable/operators/DoOnNext.java b/src/main/java/org/teepee/parallelobservable/operators/DoOnNext.java
deleted file mode 100644
index 3a6e909..0000000
--- a/src/main/java/org/teepee/parallelobservable/operators/DoOnNext.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.teepee.parallelobservable.operators;
-
-import io.reactivex.Observable;
-import io.reactivex.Observer;
-import io.reactivex.disposables.Disposable;
-import io.reactivex.internal.disposables.DisposableHelper;
-import io.reactivex.internal.disposables.EmptyDisposable;
-import io.reactivex.plugins.RxJavaPlugins;
-import org.teepee.parallelobservable.ParallelObservable;
-
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * Created by francesco on 20/11/2016.
- */
-public class DoOnNext extends ParallelObservable {
-
-
- public DoOnNext(ParallelObservable source, long n) {
- super(
- new Observable() {
- @Override
- protected void subscribeActual(Observer super T> observer) {
- source.observable().subscribe(new DoOnNext.DoOnNextObserver<>(observer));
- source.initExecutorService();
- }
- });
- }
-
- @Override
- public boolean isSerialized() {
- return true;
- }
-
- static final class DoOnNextObserver implements Observer, Disposable {
- final Observer super T> actual;
- boolean done;
-
- Disposable subscription;
-
-
- DoOnNextObserver(Observer super T> actual) {
- this.actual = actual;
- }
-
- public void onSubscribe(Disposable s) {
- if (DisposableHelper.validate(this.subscription, s)) {
- this.subscription = s;
- this.actual.onSubscribe(this);
- }
-
- }
-
-
-
- public void onNext(T t) {
-
- }
-
- public void onError(Throwable t) {
- if (this.done) {
- RxJavaPlugins.onError(t);
- } else {
- this.done = true;
- this.subscription.dispose();
- this.actual.onError(t);
- }
- }
-
- public void onComplete() {
- if (!this.done) {
- this.done = true;
- this.subscription.dispose();
- this.actual.onComplete();
- }
-
- }
-
- public void dispose() {
- this.subscription.dispose();
- }
-
- public boolean isDisposed() {
- return this.subscription.isDisposed();
- }
- }
-
-
-}
\ No newline at end of file
diff --git a/src/main/java/org/teepee/parallelobservable/operators/Take.java b/src/main/java/org/teepee/parallelobservable/operators/Take.java
deleted file mode 100644
index a5d9b51..0000000
--- a/src/main/java/org/teepee/parallelobservable/operators/Take.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.teepee.parallelobservable.operators;
-
-import io.reactivex.Observable;
-import io.reactivex.Observer;
-import io.reactivex.disposables.Disposable;
-import io.reactivex.internal.disposables.DisposableHelper;
-import io.reactivex.internal.disposables.EmptyDisposable;
-import io.reactivex.plugins.RxJavaPlugins;
-import org.teepee.parallelobservable.ParallelObservable;
-
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * Created by francesco on 20/11/2016.
- */
-public class Take extends ParallelObservable {
-
-
- public Take(ParallelObservable source, long n) {
- super(
- new Observable() {
- @Override
- protected void subscribeActual(Observer super T> observer) {
- source.observable().subscribe(new Take.TakeObserver(observer, n));
- }
- });
- }
-
- @Override
- public boolean isSerialized(){
- return true;
- }
-
- static final class TakeObserver implements Observer, Disposable {
- final Observer super T> actual;
- boolean done;
-
- Disposable subscription;
- final AtomicLong remaining;
- final AtomicInteger counter = new AtomicInteger();
- final Queue queue = new ConcurrentLinkedQueue<>();
-
-
- TakeObserver(Observer super T> actual, long limit) {
- remaining = new AtomicLong(limit);
- this.actual = actual;
- }
-
- public void onSubscribe(Disposable s) {
- if (DisposableHelper.validate(this.subscription, s)) {
- this.subscription = s;
- if (this.remaining.get() == 0L) {
- this.done = true;
- s.dispose();
- EmptyDisposable.complete(this.actual);
- } else {
- this.actual.onSubscribe(this);
- }
- }
-
- }
-
- private void onNext(Observer super T> oe, T t, Queue queue) {
- queue.offer(t);
- drain(oe, queue);
- }
-
-
-
-
-
- private void drain(Observer super T> oe, Queue queue) {
- // R t;
- if (counter.getAndIncrement() == 0) {
- do {
- //t =;
-
-
- if (!this.done && remaining.getAndDecrement() > 0L) {
- boolean stop = this.remaining.get() == 0;
- //this.actual.onNext(t);
- oe.onNext(queue.poll());
- //this.onNext(actual,t,queue);
- if (stop) {
- this.onComplete();
- }
- }
- } while (counter.decrementAndGet() != 0);
- }
- }
-
-
- public void onNext(T t) {
- this.onNext(actual,t,queue);
- }
-
- public void onError(Throwable t) {
- if (this.done) {
- RxJavaPlugins.onError(t);
- } else {
- this.done = true;
- this.subscription.dispose();
- this.actual.onError(t);
- }
- }
-
- public void onComplete() {
- if (!this.done) {
- this.done = true;
- this.subscription.dispose();
- this.actual.onComplete();
- }
-
- }
-
- public void dispose() {
- this.subscription.dispose();
- }
-
- public boolean isDisposed() {
- return this.subscription.isDisposed();
- }
- }
-
-
-}
\ No newline at end of file
diff --git a/src/test/java/org/teepee/parallelobservable/ParallelObservableTests.java b/src/test/java/org/teepee/parallelobservable/ParallelObservableTests.java
deleted file mode 100644
index c70c3ca..0000000
--- a/src/test/java/org/teepee/parallelobservable/ParallelObservableTests.java
+++ /dev/null
@@ -1,355 +0,0 @@
-package org.teepee.parallelobservable;
-
-import io.reactivex.Observable;
-import io.reactivex.Single;
-
-import java.math.BigInteger;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.IntStream;
-
-import static java.lang.Thread.sleep;
-
-/**
- * Created by francesco on 20/11/2016.
- */
-
-
-public class ParallelObservableTests {
-
-
- @org.testng.annotations.Test
- public void costructor() throws Exception {
-
- IntStream integerStream = IntStream.range(999999999, 1999999999);
- Observable integerObservable = Observable.fromIterable(integerStream::iterator);
- ParallelObservable integerParallelObservable = new ParallelObservable<>(integerObservable);
- assert integerParallelObservable.getClass() == ParallelObservable.class;
- }
-
- @org.testng.annotations.Test
- public void costructorFromObservable() throws Exception {
-
- IntStream integerStream = IntStream.range(999999999, 1999999999);
- Observable integerObservable = Observable.fromIterable(integerStream::iterator);
- ParallelObservable integerParallelObservable = ParallelObservable.fromObservable(integerObservable);
- assert integerParallelObservable.getClass() == ParallelObservable.class;
- }
-
- @org.testng.annotations.Test
- public void costructorFromIterable() throws Exception {
- IntStream integerStream = IntStream.range(999999999, 1999999999);
- ParallelObservable integerParallelObservable = ParallelObservable.fromIterable(integerStream::iterator);
- assert integerParallelObservable.getClass() == ParallelObservable.class;
- }
-
- @org.testng.annotations.Test
- public void costructorRange() throws Exception {
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 1000000000);
- assert integerParallelObservable.getClass() == ParallelObservable.class;
- }
-
-
- @org.testng.annotations.Test
- public void getObservable() throws Exception {
- Observable integerObservable = Observable.range(999999999, 1000000000);
- ParallelObservable integerParallelObservable = new ParallelObservable(integerObservable);
- assert integerParallelObservable.observable() == integerObservable; //get the source observable, no thread safe
- assert integerParallelObservable.serialObservable() != integerObservable; // trasfrom parallel observable back to sequenzial observable
-
- }
-
-
- @org.testng.annotations.Test
- public void testFilter1() throws Exception {
-
- Observable integerObservable = Observable.range(999999999, 1000000000);
- ParallelObservable integerParallelObservable = new ParallelObservable(integerObservable);
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(9).filter((Integer c) -> {
- return BigInteger.valueOf(c).isProbablePrime(100000);
- });
-
- assert parallelObservablePrimes.serialObservable().take(100000).toList().blockingGet().size() == 100000;
-
- }
-
- // test ParallelObservable.filter( lambda ) .filter(lambda)
- @org.testng.annotations.Test
- public void testFilter2() throws Exception {
-
- Observable integerObservable = Observable.range(999999999, 1000000000);
- ParallelObservable integerParallelObservable = new ParallelObservable<>(integerObservable);
-
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(4).filter((Integer c) -> {
- return BigInteger.valueOf(c).isProbablePrime(100000);
- })
- .withThreads(4).filter((Integer i) -> {
- String s = i.toString();
- return s.charAt(s.length() - 1) == '3';
- });
- assert parallelObservablePrimes.serialObservable().take(10000).toList().blockingGet().size() == 10000;
- }
-
-
- // check that parallel is faster
- @org.testng.annotations.Test
- public void testFilterSpeed() throws Exception {
-
- Observable integerObservable = Observable.range(999999999, 1000000000);
- ParallelObservable integerParallelObservable = new ParallelObservable<>(integerObservable);
-
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(4).filter((Integer c) -> {
- return BigInteger.valueOf(c).isProbablePrime(100000);
- })
- .withThreads(4).filter((Integer i) -> {
- String s = i.toString();
- return s.charAt(s.length() - 1) == '3';
- });
- Long time0 = System.currentTimeMillis();
- assert parallelObservablePrimes.take(10000).observable().toList().blockingGet().size() == 10000;
- Long time1 = System.currentTimeMillis();
-
- Long parallelElapse = time1 - time0;
-
- Observable observablePrimes = integerObservable.filter((Integer c) -> {
- return BigInteger.valueOf(c).isProbablePrime(100000);
- })
- .filter((Integer i) -> {
- String s = i.toString();
- return s.charAt(s.length() - 1) == '3';
- });
- time0 = System.currentTimeMillis();
- assert observablePrimes.take(10000).toList().blockingGet().size() == 10000;
- time1 = System.currentTimeMillis();
- Long nonParallelElapse = time1 - time0;
- assert parallelElapse < nonParallelElapse;
- }
-
-
- // test
- @org.testng.annotations.Test
- public void testFilterOutput() throws Exception {
-
- IntStream integerStream = IntStream.range(1, 1999999999);
- Observable integerObservable = Observable.fromIterable(() -> integerStream.iterator()).take(1000000);
- ParallelObservable integerParallelObservable = new ParallelObservable<>(integerObservable);
-
- ParallelObservable parallelObservablePrimes = integerParallelObservable.filter((Integer c) -> {
- return c % 2 == 0;
- });
-
- assert parallelObservablePrimes.serialObservable().toList().blockingGet().size() == 500000;
- }
-
-
- @org.testng.annotations.Test
- public void testFilterOutputAndSpeed() throws Exception {
-
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 2000);
-
- ParallelObservable parallelObservablePrimes = integerParallelObservable
- .withThreads(4).filter((Integer c) -> {
- try {
- sleep(1);
- } catch (Exception e) {
- }
- ;
- String s = new Integer(c).toString();
- return s.charAt(s.length() - 1) != '3';
- })
- .withThreads(4).filter((Integer c) -> {
- try {
- sleep(1);
- } catch (Exception e) {
- }
- ;
- String s = new Integer(c).toString();
- return s.charAt(s.length() - 1) != '2';
- });
- long time0 = System.currentTimeMillis();
- assert parallelObservablePrimes.serialObservable().toList().blockingGet().size() == 1600;
- long parallelElapse = System.currentTimeMillis() - time0;
-
-
- IntStream integerStream = IntStream.range(999999999, 999999999 + 2000);
-
- integerStream = integerStream
- .filter((int c) -> {
- try {
- sleep(1);
- } catch (Exception e) {
- }
- ;
- String s = new Integer(c).toString();
- return s.charAt(s.length() - 1) != '3';
- })
- .filter((int c) -> {
- try {
- sleep(1);
- } catch (Exception e) {
- }
- ;
- String s = new Integer(c).toString();
- return s.charAt(s.length() - 1) != '2';
- });
- ;
-
-
- time0 = System.currentTimeMillis();
- assert integerStream.toArray().length == 1600;
- long nonParallelElapse = System.currentTimeMillis() - time0;
-
- //System.out.println(parallelElapse);
- //System.out.println(nonParallelElapse);
- assert parallelElapse < nonParallelElapse;
-
- }
-
-
- @org.testng.annotations.Test
- public void testFilterBuffered() throws Exception {
-
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 1000000000);
- integerParallelObservable.withBuffer(100);
- ParallelObservable evens = integerParallelObservable.withThreads(4).filter((Integer i) -> i % 2 == 0);
-
- assert evens.serialObservable().take(10000).toList().blockingGet().size() == 10000;
-
- }
-
-
- @org.testng.annotations.Test
- public void testMap() throws Exception {
-
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 1000000000);
-
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(4).map(Object::toString);
-
- assert parallelObservablePrimes.serialObservable().take(10000).toList().blockingGet().size() == 10000;
-
- }
-
-
- @org.testng.annotations.Test
- public void testMapBuffered() throws Exception {
-
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 1000000000);
- integerParallelObservable.withBuffer(100);
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(4).map(Object::toString);
-
-
- assert parallelObservablePrimes.serialObservable().take(10000).toList().blockingGet().size() == 10000;
-
- }
-
-
- @org.testng.annotations.Test
- public void testDoOnNext() throws Exception {
-
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 1000000000);
-
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(4).doOnNext(System.out::println);
-
- assert parallelObservablePrimes.serialObservable().take(10).toList().blockingGet().size() == 10;
-
- }
-
- @org.testng.annotations.Test
- public void testTakeWhile() throws Exception {
- ParallelObservable po = ParallelObservable.range(0, 10000000);
-
- assert po.withThreads(4).doOnNext((Integer i) -> i++).withThreads(4).doOnNext((Integer i) -> i++).takeWhile((Integer i) -> i < 5000000)
- .serialObservable().toList().blockingGet().size() <= 5000000;
- }
-
- @org.testng.annotations.Test
- public void testTakeUntil() throws Exception {
- ParallelObservable po = ParallelObservable.range(0, 10000);
-
- long count = po.withThreads(4).doOnNext((Integer i) -> i++).withThreads(4)
- .doOnNext((Integer i) -> i++)
- .takeUntil((Integer i) ->{ sleep(0,500);return i >= 5000;})
- .serialObservable().toList().blockingGet().size();
- //System.out.println(count);
- assert count <= 5010;
- }
-
- @org.testng.annotations.Test
- public void testUnparallelTakeUntil() throws Exception {
- ParallelObservable po = ParallelObservable.range(0, 10000);
-
- long count = po.withThreads(4).doOnNext((Integer i) -> i++).withThreads(4)
- .doOnNext((Integer i) -> i++)
- .unparallelTtakeUntil((Integer i) ->{ sleep(0,500);return i >= 5000;})
- .serialObservable().toList().blockingGet().size();
- //System.out.println(count);
- assert count <= 5010;
- }
-
- @org.testng.annotations.Test
- public void testTake() throws Exception {
- ParallelObservable po = ParallelObservable.range(0, 10000000);
-
- long count = po.withThreads(4).doOnNext((Integer i) -> i++).withThreads(4).doOnNext((Integer i) -> i++).take(5000000)
- .observable().toList().blockingGet().size();
- //System.out.println(count);
- assert count == 5000000;
- assert po.take(10).isSerialized();
-
- }
-
-
- @org.testng.annotations.Test
- public void testDoOnNextBuffered() throws Exception {
-
- ParallelObservable integerParallelObservable = ParallelObservable.range(999999999, 1000000000);
- integerParallelObservable.withBuffer(100);
- ParallelObservable parallelObservablePrimes = integerParallelObservable.withThreads(4).doOnNext(System.out::println);
-
- Single> s = parallelObservablePrimes.serialObservable().take(10000).toList();
- assert s.blockingGet().size() == 10000;
- }
-
-
- @org.testng.annotations.Test
- public void testUnparallel() throws Exception {
- ParallelObservable integerParallelObservable = ParallelObservable.range(1, 10000);
- assert integerParallelObservable.unparallel().filter(l->l%2==0).serialObservable().toList().blockingGet().size()==5000;
- }
-
-
- @org.testng.annotations.Test
- public void testUnparallelBuffer() throws Exception {
- ParallelObservable parallelObservable = ParallelObservable.fromObservable(Observable.interval(1,TimeUnit.SECONDS)).unparallel().withBuffer(2)
- .doOnNext(l->l++)
- .doOnNext(l->System.out.println(">>>>"+l))
- .take(3);
- parallelObservable.observable()
- .blockingSubscribe();
- //assert integerParallelObservable.unparallel().filter(l->l%2==0).serialObservable().toList().blockingGet().size()==5000;
- }
-
-
- @org.testng.annotations.Test
- public void testBuffer() throws Exception {
- //Observable.interval(1,TimeUnit.SECONDS).takeWhile(l->l<3).blockingSubscribe(l->System.out.println(l));
-
- Observable o = Observable.interval(1,TimeUnit.SECONDS);
- //Observable.interval(1,TimeUnit.SECONDS).take(10).forEachWhile(l->{System.out.println("CCC");return true;});
-
- ParallelObservable parallelObservable = ParallelObservable.fromObservable(o).withThreads(4).withBuffer(2)
- //.map(l->l++)
- .doOnNext(l->System.out.println(">>>>"+l))
- .take(3);
- parallelObservable.serialObservable().blockingSubscribe();
- //o.blockingSubscribe();
- //assert integerParallelObservable.unparallel().filter(l->l%2==0).serialObservable().toList().blockingGet().size()==5000;
- }
-
-
-
-
-
-
-
-}
\ No newline at end of file
diff --git a/stylesheets/github-light.css b/stylesheets/github-light.css
new file mode 100644
index 0000000..0c6b24d
--- /dev/null
+++ b/stylesheets/github-light.css
@@ -0,0 +1,124 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2016 GitHub, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+*/
+
+.pl-c /* comment */ {
+ color: #969896;
+}
+
+.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
+.pl-s .pl-v /* string variable */ {
+ color: #0086b3;
+}
+
+.pl-e /* entity */,
+.pl-en /* entity.name */ {
+ color: #795da3;
+}
+
+.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
+.pl-s .pl-s1 /* string source */ {
+ color: #333;
+}
+
+.pl-ent /* entity.name.tag */ {
+ color: #63a35c;
+}
+
+.pl-k /* keyword, storage, storage.type */ {
+ color: #a71d5d;
+}
+
+.pl-s /* string */,
+.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
+.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
+.pl-sr /* string.regexp */,
+.pl-sr .pl-cce /* string.regexp constant.character.escape */,
+.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
+.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
+ color: #183691;
+}
+
+.pl-v /* variable */ {
+ color: #ed6a43;
+}
+
+.pl-id /* invalid.deprecated */ {
+ color: #b52a1d;
+}
+
+.pl-ii /* invalid.illegal */ {
+ color: #f8f8f8;
+ background-color: #b52a1d;
+}
+
+.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
+ font-weight: bold;
+ color: #63a35c;
+}
+
+.pl-ml /* markup.list */ {
+ color: #693a17;
+}
+
+.pl-mh /* markup.heading */,
+.pl-mh .pl-en /* markup.heading entity.name */,
+.pl-ms /* meta.separator */ {
+ font-weight: bold;
+ color: #1d3e81;
+}
+
+.pl-mq /* markup.quote */ {
+ color: #008080;
+}
+
+.pl-mi /* markup.italic */ {
+ font-style: italic;
+ color: #333;
+}
+
+.pl-mb /* markup.bold */ {
+ font-weight: bold;
+ color: #333;
+}
+
+.pl-md /* markup.deleted, meta.diff.header.from-file */ {
+ color: #bd2c00;
+ background-color: #ffecec;
+}
+
+.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
+ color: #55a532;
+ background-color: #eaffea;
+}
+
+.pl-mdr /* meta.diff.range */ {
+ font-weight: bold;
+ color: #795da3;
+}
+
+.pl-mo /* meta.output */ {
+ color: #1d3e81;
+}
+
diff --git a/stylesheets/normalize.css b/stylesheets/normalize.css
new file mode 100644
index 0000000..30366a6
--- /dev/null
+++ b/stylesheets/normalize.css
@@ -0,0 +1,424 @@
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
+
+/**
+ * 1. Set default font family to sans-serif.
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+ font-family: sans-serif; /* 1 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Remove default margin.
+ */
+
+body {
+ margin: 0;
+}
+
+/* HTML5 display definitions
+ ========================================================================== */
+
+/**
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
+ * and Firefox.
+ * Correct `block` display not defined for `main` in IE 11.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/**
+ * 1. Correct `inline-block` display not defined in IE 8/9.
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ */
+
+audio,
+canvas,
+progress,
+video {
+ display: inline-block; /* 1 */
+ vertical-align: baseline; /* 2 */
+}
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/**
+ * Address `[hidden]` styling not present in IE 8/9/10.
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
+ */
+
+[hidden],
+template {
+ display: none;
+}
+
+/* Links
+ ========================================================================== */
+
+/**
+ * Remove the gray background color from active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/**
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+/**
+ * Address styling not present in Safari and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/**
+ * Address variable `h1` font-size and margin within `section` and `article`
+ * contexts in Firefox 4+, Safari, and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove border when inside `a` element in IE 8/9/10.
+ */
+
+img {
+ border: 0;
+}
+
+/**
+ * Correct overflow not hidden in IE 9/10/11.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * Address margin not present in IE 8/9 and Safari.
+ */
+
+figure {
+ margin: 1em 40px;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+
+hr {
+ box-sizing: content-box;
+ height: 0;
+}
+
+/**
+ * Contain overflow in all browsers.
+ */
+
+pre {
+ overflow: auto;
+}
+
+/**
+ * Address odd `em`-unit font size rendering in all browsers.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
+ * styling of `select`, unless a `border` property is set.
+ */
+
+/**
+ * 1. Correct color not being inherited.
+ * Known issue: affects color of disabled elements.
+ * 2. Correct font properties not being inherited.
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ color: inherit; /* 1 */
+ font: inherit; /* 2 */
+ margin: 0; /* 3 */
+}
+
+/**
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ */
+
+button {
+ overflow: visible;
+}
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
+ * Correct `select` style inheritance in Firefox.
+ */
+
+button,
+select {
+ text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ * `input` and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+
+/**
+ * Remove inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/**
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+input {
+ line-height: normal;
+}
+
+/**
+ * It's recommended that you don't attempt to style these elements.
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
+ *
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
+ * 2. Remove excess padding in IE 8/9/10.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
+ * `font-size` values of the `input`, it causes the cursor style of the
+ * decrement button to change from `default` to `text`.
+ */
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */ /* 2 */
+ box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
+ * Safari (but not Chrome) clips the cancel button when the search input has
+ * padding (and `textfield` appearance).
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Remove default vertical scrollbar in IE 8/9/10/11.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * Don't inherit the `font-weight` (applied by a rule above).
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ */
+
+optgroup {
+ font-weight: bold;
+}
+
+/* Tables
+ ========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+td,
+th {
+ padding: 0;
+}
diff --git a/stylesheets/styles.css b/stylesheets/styles.css
new file mode 100644
index 0000000..2e1768e
--- /dev/null
+++ b/stylesheets/styles.css
@@ -0,0 +1,324 @@
+@font-face {
+ font-family: 'Noto Sans';
+ font-weight: 400;
+ font-style: normal;
+ src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot');
+ src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot?#iefix') format('embedded-opentype'),
+ local('Noto Sans'),
+ local('Noto-Sans-regular'),
+ url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff2') format('woff2'),
+ url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff') format('woff'),
+ url('../fonts/Noto-Sans-regular/Noto-Sans-regular.ttf') format('truetype'),
+ url('../fonts/Noto-Sans-regular/Noto-Sans-regular.svg#NotoSans') format('svg');
+}
+
+@font-face {
+ font-family: 'Noto Sans';
+ font-weight: 700;
+ font-style: normal;
+ src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot');
+ src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot?#iefix') format('embedded-opentype'),
+ local('Noto Sans Bold'),
+ local('Noto-Sans-700'),
+ url('../fonts/Noto-Sans-700/Noto-Sans-700.woff2') format('woff2'),
+ url('../fonts/Noto-Sans-700/Noto-Sans-700.woff') format('woff'),
+ url('../fonts/Noto-Sans-700/Noto-Sans-700.ttf') format('truetype'),
+ url('../fonts/Noto-Sans-700/Noto-Sans-700.svg#NotoSans') format('svg');
+}
+
+@font-face {
+ font-family: 'Noto Sans';
+ font-weight: 400;
+ font-style: italic;
+ src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot');
+ src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot?#iefix') format('embedded-opentype'),
+ local('Noto Sans Italic'),
+ local('Noto-Sans-italic'),
+ url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff2') format('woff2'),
+ url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff') format('woff'),
+ url('../fonts/Noto-Sans-italic/Noto-Sans-italic.ttf') format('truetype'),
+ url('../fonts/Noto-Sans-italic/Noto-Sans-italic.svg#NotoSans') format('svg');
+}
+
+@font-face {
+ font-family: 'Noto Sans';
+ font-weight: 700;
+ font-style: italic;
+ src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot');
+ src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot?#iefix') format('embedded-opentype'),
+ local('Noto Sans Bold Italic'),
+ local('Noto-Sans-700italic'),
+ url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2') format('woff2'),
+ url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff') format('woff'),
+ url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'),
+ url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg');
+}
+
+body {
+ background-color: #fff;
+ padding:50px;
+ font: 14px/1.5 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color:#727272;
+ font-weight:400;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color:#222;
+ margin:0 0 20px;
+}
+
+p, ul, ol, table, pre, dl {
+ margin:0 0 20px;
+}
+
+h1, h2, h3 {
+ line-height:1.1;
+}
+
+h1 {
+ font-size:28px;
+}
+
+h2 {
+ color:#393939;
+}
+
+h3, h4, h5, h6 {
+ color:#494949;
+}
+
+a {
+ color:#39c;
+ text-decoration:none;
+}
+
+a:hover {
+ color:#069;
+}
+
+a small {
+ font-size:11px;
+ color:#777;
+ margin-top:-0.3em;
+ display:block;
+}
+
+a:hover small {
+ color:#777;
+}
+
+.wrapper {
+ width:860px;
+ margin:0 auto;
+}
+
+blockquote {
+ border-left:1px solid #e5e5e5;
+ margin:0;
+ padding:0 0 0 20px;
+ font-style:italic;
+}
+
+code, pre {
+ font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
+ color:#333;
+ font-size:12px;
+}
+
+pre {
+ padding:8px 15px;
+ background: #f8f8f8;
+ border-radius:5px;
+ border:1px solid #e5e5e5;
+ overflow-x: auto;
+}
+
+table {
+ width:100%;
+ border-collapse:collapse;
+}
+
+th, td {
+ text-align:left;
+ padding:5px 10px;
+ border-bottom:1px solid #e5e5e5;
+}
+
+dt {
+ color:#444;
+ font-weight:700;
+}
+
+th {
+ color:#444;
+}
+
+img {
+ max-width:100%;
+}
+
+header {
+ width:270px;
+ float:left;
+ position:fixed;
+ -webkit-font-smoothing:subpixel-antialiased;
+}
+
+header ul {
+ list-style:none;
+ height:40px;
+ padding:0;
+ background: #f4f4f4;
+ border-radius:5px;
+ border:1px solid #e0e0e0;
+ width:270px;
+}
+
+header li {
+ width:89px;
+ float:left;
+ border-right:1px solid #e0e0e0;
+ height:40px;
+}
+
+header li:first-child a {
+ border-radius:5px 0 0 5px;
+}
+
+header li:last-child a {
+ border-radius:0 5px 5px 0;
+}
+
+header ul a {
+ line-height:1;
+ font-size:11px;
+ color:#999;
+ display:block;
+ text-align:center;
+ padding-top:6px;
+ height:34px;
+}
+
+header ul a:hover {
+ color:#999;
+}
+
+header ul a:active {
+ background-color:#f0f0f0;
+}
+
+strong {
+ color:#222;
+ font-weight:700;
+}
+
+header ul li + li + li {
+ border-right:none;
+ width:89px;
+}
+
+header ul a strong {
+ font-size:14px;
+ display:block;
+ color:#222;
+}
+
+section {
+ width:500px;
+ float:right;
+ padding-bottom:50px;
+}
+
+small {
+ font-size:11px;
+}
+
+hr {
+ border:0;
+ background:#e5e5e5;
+ height:1px;
+ margin:0 0 20px;
+}
+
+footer {
+ width:270px;
+ float:left;
+ position:fixed;
+ bottom:50px;
+ -webkit-font-smoothing:subpixel-antialiased;
+}
+
+@media print, screen and (max-width: 960px) {
+
+ div.wrapper {
+ width:auto;
+ margin:0;
+ }
+
+ header, section, footer {
+ float:none;
+ position:static;
+ width:auto;
+ }
+
+ header {
+ padding-right:320px;
+ }
+
+ section {
+ border:1px solid #e5e5e5;
+ border-width:1px 0;
+ padding:20px 0;
+ margin:0 0 20px;
+ }
+
+ header a small {
+ display:inline;
+ }
+
+ header ul {
+ position:absolute;
+ right:50px;
+ top:52px;
+ }
+}
+
+@media print, screen and (max-width: 720px) {
+ body {
+ word-wrap:break-word;
+ }
+
+ header {
+ padding:0;
+ }
+
+ header ul, header p.view {
+ position:static;
+ }
+
+ pre, code {
+ word-wrap:normal;
+ }
+}
+
+@media print, screen and (max-width: 480px) {
+ body {
+ padding:15px;
+ }
+
+ header ul {
+ width:99%;
+ }
+
+ header li, header ul li + li + li {
+ width:33%;
+ }
+}
+
+@media print {
+ body {
+ padding:0.4in;
+ font-size:12pt;
+ color:#444;
+ }
+}
diff --git a/stylesheets/stylesheet.css b/stylesheets/stylesheet.css
new file mode 100644
index 0000000..b5f20c2
--- /dev/null
+++ b/stylesheets/stylesheet.css
@@ -0,0 +1,245 @@
+* {
+ box-sizing: border-box; }
+
+body {
+ padding: 0;
+ margin: 0;
+ font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 16px;
+ line-height: 1.5;
+ color: #606c71; }
+
+a {
+ color: #1e6bb8;
+ text-decoration: none; }
+ a:hover {
+ text-decoration: underline; }
+
+.btn {
+ display: inline-block;
+ margin-bottom: 1rem;
+ color: rgba(255, 255, 255, 0.7);
+ background-color: rgba(255, 255, 255, 0.08);
+ border-color: rgba(255, 255, 255, 0.2);
+ border-style: solid;
+ border-width: 1px;
+ border-radius: 0.3rem;
+ transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
+ .btn + .btn {
+ margin-left: 1rem; }
+
+.btn:hover {
+ color: rgba(255, 255, 255, 0.8);
+ text-decoration: none;
+ background-color: rgba(255, 255, 255, 0.2);
+ border-color: rgba(255, 255, 255, 0.3); }
+
+@media screen and (min-width: 64em) {
+ .btn {
+ padding: 0.75rem 1rem; } }
+
+@media screen and (min-width: 42em) and (max-width: 64em) {
+ .btn {
+ padding: 0.6rem 0.9rem;
+ font-size: 0.9rem; } }
+
+@media screen and (max-width: 42em) {
+ .btn {
+ display: block;
+ width: 100%;
+ padding: 0.75rem;
+ font-size: 0.9rem; }
+ .btn + .btn {
+ margin-top: 1rem;
+ margin-left: 0; } }
+
+.page-header {
+ color: #fff;
+ text-align: center;
+ background-color: #159957;
+ background-image: linear-gradient(120deg, #155799, #159957); }
+
+@media screen and (min-width: 64em) {
+ .page-header {
+ padding: 5rem 6rem; } }
+
+@media screen and (min-width: 42em) and (max-width: 64em) {
+ .page-header {
+ padding: 3rem 4rem; } }
+
+@media screen and (max-width: 42em) {
+ .page-header {
+ padding: 2rem 1rem; } }
+
+.project-name {
+ margin-top: 0;
+ margin-bottom: 0.1rem; }
+
+@media screen and (min-width: 64em) {
+ .project-name {
+ font-size: 3.25rem; } }
+
+@media screen and (min-width: 42em) and (max-width: 64em) {
+ .project-name {
+ font-size: 2.25rem; } }
+
+@media screen and (max-width: 42em) {
+ .project-name {
+ font-size: 1.75rem; } }
+
+.project-tagline {
+ margin-bottom: 2rem;
+ font-weight: normal;
+ opacity: 0.7; }
+
+@media screen and (min-width: 64em) {
+ .project-tagline {
+ font-size: 1.25rem; } }
+
+@media screen and (min-width: 42em) and (max-width: 64em) {
+ .project-tagline {
+ font-size: 1.15rem; } }
+
+@media screen and (max-width: 42em) {
+ .project-tagline {
+ font-size: 1rem; } }
+
+.main-content :first-child {
+ margin-top: 0; }
+.main-content img {
+ max-width: 100%; }
+.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
+ margin-top: 2rem;
+ margin-bottom: 1rem;
+ font-weight: normal;
+ color: #159957; }
+.main-content p {
+ margin-bottom: 1em; }
+.main-content code {
+ padding: 2px 4px;
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ font-size: 0.9rem;
+ color: #383e41;
+ background-color: #f3f6fa;
+ border-radius: 0.3rem; }
+.main-content pre {
+ padding: 0.8rem;
+ margin-top: 0;
+ margin-bottom: 1rem;
+ font: 1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ color: #567482;
+ word-wrap: normal;
+ background-color: #f3f6fa;
+ border: solid 1px #dce6f0;
+ border-radius: 0.3rem; }
+ .main-content pre > code {
+ padding: 0;
+ margin: 0;
+ font-size: 0.9rem;
+ color: #567482;
+ word-break: normal;
+ white-space: pre;
+ background: transparent;
+ border: 0; }
+.main-content .highlight {
+ margin-bottom: 1rem; }
+ .main-content .highlight pre {
+ margin-bottom: 0;
+ word-break: normal; }
+.main-content .highlight pre, .main-content pre {
+ padding: 0.8rem;
+ overflow: auto;
+ font-size: 0.9rem;
+ line-height: 1.45;
+ border-radius: 0.3rem; }
+.main-content pre code, .main-content pre tt {
+ display: inline;
+ max-width: initial;
+ padding: 0;
+ margin: 0;
+ overflow: initial;
+ line-height: inherit;
+ word-wrap: normal;
+ background-color: transparent;
+ border: 0; }
+ .main-content pre code:before, .main-content pre code:after, .main-content pre tt:before, .main-content pre tt:after {
+ content: normal; }
+.main-content ul, .main-content ol {
+ margin-top: 0; }
+.main-content blockquote {
+ padding: 0 1rem;
+ margin-left: 0;
+ color: #819198;
+ border-left: 0.3rem solid #dce6f0; }
+ .main-content blockquote > :first-child {
+ margin-top: 0; }
+ .main-content blockquote > :last-child {
+ margin-bottom: 0; }
+.main-content table {
+ display: block;
+ width: 100%;
+ overflow: auto;
+ word-break: normal;
+ word-break: keep-all; }
+ .main-content table th {
+ font-weight: bold; }
+ .main-content table th, .main-content table td {
+ padding: 0.5rem 1rem;
+ border: 1px solid #e9ebec; }
+.main-content dl {
+ padding: 0; }
+ .main-content dl dt {
+ padding: 0;
+ margin-top: 1rem;
+ font-size: 1rem;
+ font-weight: bold; }
+ .main-content dl dd {
+ padding: 0;
+ margin-bottom: 1rem; }
+.main-content hr {
+ height: 2px;
+ padding: 0;
+ margin: 1rem 0;
+ background-color: #eff0f1;
+ border: 0; }
+
+@media screen and (min-width: 64em) {
+ .main-content {
+ max-width: 64rem;
+ padding: 2rem 6rem;
+ margin: 0 auto;
+ font-size: 1.1rem; } }
+
+@media screen and (min-width: 42em) and (max-width: 64em) {
+ .main-content {
+ padding: 2rem 4rem;
+ font-size: 1.1rem; } }
+
+@media screen and (max-width: 42em) {
+ .main-content {
+ padding: 2rem 1rem;
+ font-size: 1rem; } }
+
+.site-footer {
+ padding-top: 2rem;
+ margin-top: 2rem;
+ border-top: solid 1px #eff0f1; }
+
+.site-footer-owner {
+ display: block;
+ font-weight: bold; }
+
+.site-footer-credits {
+ color: #819198; }
+
+@media screen and (min-width: 64em) {
+ .site-footer {
+ font-size: 1rem; } }
+
+@media screen and (min-width: 42em) and (max-width: 64em) {
+ .site-footer {
+ font-size: 1rem; } }
+
+@media screen and (max-width: 42em) {
+ .site-footer {
+ font-size: 0.9rem; } }
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$1.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$1.class
deleted file mode 100644
index 5043993..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$1.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$2.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$2.class
deleted file mode 100644
index c7345d8..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$2.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$3.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$3.class
deleted file mode 100644
index 54ed432..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$3.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$4.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$4.class
deleted file mode 100644
index 438a68d..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$4.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$5.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$5.class
deleted file mode 100644
index 1f2c807..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$5.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$6.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$6.class
deleted file mode 100644
index 9381f49..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$6.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable$7.class b/target/classes/org/teepee/parallelobservable/ParallelObservable$7.class
deleted file mode 100644
index da9fbbc..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable$7.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/ParallelObservable.class b/target/classes/org/teepee/parallelobservable/ParallelObservable.class
deleted file mode 100644
index 075b8da..0000000
Binary files a/target/classes/org/teepee/parallelobservable/ParallelObservable.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/Take$1.class b/target/classes/org/teepee/parallelobservable/operators/Take$1.class
deleted file mode 100644
index 6c39584..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/Take$1.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/Take$TakeObserver.class b/target/classes/org/teepee/parallelobservable/operators/Take$TakeObserver.class
deleted file mode 100644
index 066e555..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/Take$TakeObserver.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/Take.class b/target/classes/org/teepee/parallelobservable/operators/Take.class
deleted file mode 100644
index 7f0a7f5..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/Take.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/TakeWhile$1.class b/target/classes/org/teepee/parallelobservable/operators/TakeWhile$1.class
deleted file mode 100644
index 2a4bc0c..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/TakeWhile$1.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/TakeWhile$TakeWhileObserver.class b/target/classes/org/teepee/parallelobservable/operators/TakeWhile$TakeWhileObserver.class
deleted file mode 100644
index 594ec78..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/TakeWhile$TakeWhileObserver.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/TakeWhile.class b/target/classes/org/teepee/parallelobservable/operators/TakeWhile.class
deleted file mode 100644
index ce993e9..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/TakeWhile.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/ToObservable$1.class b/target/classes/org/teepee/parallelobservable/operators/ToObservable$1.class
deleted file mode 100644
index b4b2bb4..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/ToObservable$1.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/ToObservable$TakeObserver.class b/target/classes/org/teepee/parallelobservable/operators/ToObservable$TakeObserver.class
deleted file mode 100644
index 9e056a2..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/ToObservable$TakeObserver.class and /dev/null differ
diff --git a/target/classes/org/teepee/parallelobservable/operators/ToObservable.class b/target/classes/org/teepee/parallelobservable/operators/ToObservable.class
deleted file mode 100644
index ff2d4f8..0000000
Binary files a/target/classes/org/teepee/parallelobservable/operators/ToObservable.class and /dev/null differ
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
deleted file mode 100644
index 272d915..0000000
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
+++ /dev/null
@@ -1,7 +0,0 @@
-org\teepee\parallelpipe\FunctionZero.class
-org\teepee\parallelpipe\ParallelPipe$1.class
-org\teepee\parallelpipe\ParallelPipe.class
-org\teepee\parallelpipe\ParallelPipe$3.class
-org\teepee\parallelpipe\ParallelPipe$5.class
-org\teepee\parallelpipe\ParallelPipe$2.class
-org\teepee\parallelpipe\ParallelPipe$4.class
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
deleted file mode 100644
index 54f5d47..0000000
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-C:\Users\francesco\IdeaProjects\rxjava2\src\main\java\org\teepee\parallelpipe\ParallelPipe.java
-C:\Users\francesco\IdeaProjects\rxjava2\src\main\java\org\teepee\parallelpipe\FunctionZero.java
diff --git a/target/test-classes/org/teepee/parallelobservable/ParallelObservableTests.class b/target/test-classes/org/teepee/parallelobservable/ParallelObservableTests.class
deleted file mode 100644
index 7a2d4bf..0000000
Binary files a/target/test-classes/org/teepee/parallelobservable/ParallelObservableTests.class and /dev/null differ