Skip to content

Commit 49f91e7

Browse files
author
Aaron Tull
committed
Renaming biobservable to dyadobservable
1 parent ec83759 commit 49f91e7

File tree

8 files changed

+134
-130
lines changed

8 files changed

+134
-130
lines changed

gradle/wrapper/gradle-wrapper.jar

1.44 KB
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Feb 05 12:05:54 CET 2014
1+
#Thu Jan 08 17:32:57 PST 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip

gradlew.bat

+90-90
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
1-
@if "%DEBUG%" == "" @echo off
2-
@rem ##########################################################################
3-
@rem
4-
@rem Gradle startup script for Windows
5-
@rem
6-
@rem ##########################################################################
7-
8-
@rem Set local scope for the variables with windows NT shell
9-
if "%OS%"=="Windows_NT" setlocal
10-
11-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12-
set DEFAULT_JVM_OPTS=
13-
14-
set DIRNAME=%~dp0
15-
if "%DIRNAME%" == "" set DIRNAME=.
16-
set APP_BASE_NAME=%~n0
17-
set APP_HOME=%DIRNAME%
18-
19-
@rem Find java.exe
20-
if defined JAVA_HOME goto findJavaFromJavaHome
21-
22-
set JAVA_EXE=java.exe
23-
%JAVA_EXE% -version >NUL 2>&1
24-
if "%ERRORLEVEL%" == "0" goto init
25-
26-
echo.
27-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28-
echo.
29-
echo Please set the JAVA_HOME variable in your environment to match the
30-
echo location of your Java installation.
31-
32-
goto fail
33-
34-
:findJavaFromJavaHome
35-
set JAVA_HOME=%JAVA_HOME:"=%
36-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37-
38-
if exist "%JAVA_EXE%" goto init
39-
40-
echo.
41-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42-
echo.
43-
echo Please set the JAVA_HOME variable in your environment to match the
44-
echo location of your Java installation.
45-
46-
goto fail
47-
48-
:init
49-
@rem Get command-line arguments, handling Windowz variants
50-
51-
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
if "%@eval[2+2]" == "4" goto 4NT_args
53-
54-
:win9xME_args
55-
@rem Slurp the command line arguments.
56-
set CMD_LINE_ARGS=
57-
set _SKIP=2
58-
59-
:win9xME_args_slurp
60-
if "x%~1" == "x" goto execute
61-
62-
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
68-
69-
:execute
70-
@rem Setup the command line
71-
72-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73-
74-
@rem Execute Gradle
75-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76-
77-
:end
78-
@rem End local scope for the variables with windows NT shell
79-
if "%ERRORLEVEL%"=="0" goto mainEnd
80-
81-
:fail
82-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83-
rem the _cmd.exe /c_ return code!
84-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85-
exit /b 1
86-
87-
:mainEnd
88-
if "%OS%"=="Windows_NT" endlocal
89-
90-
:omega
1+
@if "%DEBUG%" == "" @echo off
2+
@rem ##########################################################################
3+
@rem
4+
@rem Gradle startup script for Windows
5+
@rem
6+
@rem ##########################################################################
7+
8+
@rem Set local scope for the variables with windows NT shell
9+
if "%OS%"=="Windows_NT" setlocal
10+
11+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12+
set DEFAULT_JVM_OPTS=
13+
14+
set DIRNAME=%~dp0
15+
if "%DIRNAME%" == "" set DIRNAME=.
16+
set APP_BASE_NAME=%~n0
17+
set APP_HOME=%DIRNAME%
18+
19+
@rem Find java.exe
20+
if defined JAVA_HOME goto findJavaFromJavaHome
21+
22+
set JAVA_EXE=java.exe
23+
%JAVA_EXE% -version >NUL 2>&1
24+
if "%ERRORLEVEL%" == "0" goto init
25+
26+
echo.
27+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28+
echo.
29+
echo Please set the JAVA_HOME variable in your environment to match the
30+
echo location of your Java installation.
31+
32+
goto fail
33+
34+
:findJavaFromJavaHome
35+
set JAVA_HOME=%JAVA_HOME:"=%
36+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37+
38+
if exist "%JAVA_EXE%" goto init
39+
40+
echo.
41+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42+
echo.
43+
echo Please set the JAVA_HOME variable in your environment to match the
44+
echo location of your Java installation.
45+
46+
goto fail
47+
48+
:init
49+
@rem Get command-line arguments, handling Windowz variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
if "%@eval[2+2]" == "4" goto 4NT_args
53+
54+
:win9xME_args
55+
@rem Slurp the command line arguments.
56+
set CMD_LINE_ARGS=
57+
set _SKIP=2
58+
59+
:win9xME_args_slurp
60+
if "x%~1" == "x" goto execute
61+
62+
set CMD_LINE_ARGS=%*
63+
goto execute
64+
65+
:4NT_args
66+
@rem Get arguments from the 4NT Shell from JP Software
67+
set CMD_LINE_ARGS=%$
68+
69+
:execute
70+
@rem Setup the command line
71+
72+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
74+
@rem Execute Gradle
75+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76+
77+
:end
78+
@rem End local scope for the variables with windows NT shell
79+
if "%ERRORLEVEL%"=="0" goto mainEnd
80+
81+
:fail
82+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83+
rem the _cmd.exe /c_ return code!
84+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85+
exit /b 1
86+
87+
:mainEnd
88+
if "%OS%"=="Windows_NT" endlocal
89+
90+
:omega

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name='rxjava-biobservable'
1+
rootProject.name='rxjava-multi'

src/main/java/rx/DyadObservable.java

+38-34
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import rx.operators.DyadOperator;
2121
import rx.operators.DyadToSingleOperator;
2222
import rx.operators.SingleToDyadOperator;
23+
2324
// dyad, triad, tetrad, pentad
2425
public class DyadObservable<T0, T1> {
2526
private DyadOnSubscribe<T0, T1> onSubscribeFunc;
@@ -33,13 +34,12 @@ public class DyadObservable<T0, T1> {
3334
* @param <T1>
3435
* type of second argument
3536
*/
36-
public static interface DyadOnSubscribe<T0, T1> extends Action1<DyadSubscriber<? super T0, ? super T1>> {
37-
}
37+
public static interface DyadOnSubscribe<T0, T1> extends Action1<DyadSubscriber<? super T0, ? super T1>> {}
3838

3939
/**
4040
* @param onSubscribeFunc
4141
*/
42-
protected DyadObservable(DyadOnSubscribe<T0, T1> onSubscribeFunc) {
42+
private DyadObservable(DyadOnSubscribe<T0, T1> onSubscribeFunc) {
4343
this.onSubscribeFunc = onSubscribeFunc;
4444
}
4545

@@ -59,7 +59,7 @@ public void subcribe(DyadSubscriber<? super T0, ? super T1> subscriber) {
5959
}
6060

6161
/**
62-
* Create a new BiObservable that defers the subscription of {@code this} with a
62+
* Create a new DyadObservable that defers the subscription of {@code this} with a
6363
* {@link DyadSubscriber subscriber} that applies the given operator's effect to values produced
6464
* when subscribed to.
6565
*
@@ -81,8 +81,8 @@ public void call(DyadSubscriber<? super R0, ? super R1> child) {
8181
/**
8282
* Create a new {@link Observable} that defers the subscription of {@code this} with a
8383
* {@link DyadSubscriber subscriber} that applies the given operator's effect to values produced
84-
* when subscribed to. This overload of {@code lift} converts a BiObservable to a single-valued
85-
* Observable.
84+
* when subscribed to. This overload of {@code lift} converts a DyadObservable to a
85+
* single-valued Observable.
8686
*
8787
* @param operator
8888
* a function to adapt the types and semantics of the downstream operator.
@@ -121,29 +121,29 @@ public void call(DyadSubscriber<? super R0, ? super R1> subscriber) {
121121
}
122122

123123
/**
124-
* Converts an Observable to a BiObservable by applying a function to generate a second value
124+
* Converts an Observable to a DyadObservable by applying a function to generate a second value
125125
* based on the values produced by the {@code observable}.
126126
*
127127
* @param observable
128128
* the producer
129129
* @param generatorFunc
130-
* ran once per call made to onNext to produce the paired BiObservable's second
130+
* ran once per call made to onNext to produce the paired DyadObservable's second
131131
* value
132-
* @return a BiObservable encapsulating the subscription to the given {@code observable}
132+
* @return a DyadObservable encapsulating the subscription to the given {@code observable}
133133
*/
134134
public static <T0, T1> DyadObservable<T0, T1> generate(final Observable<? extends T0> observable, final Func1<? super T0, ? extends T1> generatorFunc) {
135135
return DyadObservable.lift(observable, new OperatorGenerate<T0, T1>(generatorFunc));
136136
}
137137

138138
/**
139-
* Creates a BiObservable by zipping two observables. Each value produced by the returned
140-
* BiObservable is the pair of each value emitted by the given observables.
139+
* Creates a DyadObservable by zipping two observables. Each value produced by the returned
140+
* DyadObservable is the pair of each value emitted by the given observables.
141141
*
142142
* @param ob0
143143
* the first observable
144144
* @param ob1
145145
* the second observable
146-
* @return a BiObservable encapsulating the subscription to both observables
146+
* @return a DyadObservable encapsulating the subscription to both observables
147147
*/
148148
public static <T0, T1> DyadObservable<T0, T1> zip(final Observable<? extends T0> ob0, final Observable<? extends T1> ob1) {
149149
return create(new DyadOnSubscribe<T0, T1>() {
@@ -210,13 +210,13 @@ public void onNext(Void t) {
210210
}
211211

212212
/**
213-
* Creates a BiObservable that emits one pair of elements for each combination of the elements
213+
* Creates a DyadObservable that emits one pair of elements for each combination of the elements
214214
* emitted by the observables passed as parameters. This produces the Cartesian product of all
215215
* emitted elements from two observables.
216216
*
217217
* @param ob0
218218
* @param ob1
219-
* @return a BiObservable that produces the Cartesian product of
219+
* @return a DyadObservable that produces the Cartesian product of
220220
*/
221221
public static <T0, T1> DyadObservable<T0, T1> product(final Observable<? extends T0> ob0, final Observable<? extends T1> ob1) {
222222
return create(new DyadOnSubscribe<T0, T1>() {
@@ -253,14 +253,14 @@ public void onNext(Void t) {
253253
}
254254

255255
/**
256-
* Creates a BiObservable from an observable and a non-deterministic-arity generator function.
256+
* Creates a DyadObservable from an observable and a non-deterministic-arity generator function.
257257
* This emits a pair of each generatorFunc's output element with the input it was obtained from.
258258
* Note that if the generatorFunc produces an "empty" observable then no pairs will be emitted
259259
* for that input element.
260260
*
261261
* @param ob0
262262
* @param generatorFunc
263-
* @return a BiObservable that
263+
* @return a DyadObservable that
264264
*/
265265
public static <T0, T1> DyadObservable<T0, T1> sparseProduct(final Observable<? extends T0> ob0, final Func1<? super T0, Observable<T1>> generatorFunc) {
266266
return create(new DyadOnSubscribe<T0, T1>() {
@@ -319,28 +319,30 @@ public static <T0, T1> DyadObservable<T0, T1> attach(Observable<? extends T0> ob
319319
}
320320

321321
/**
322-
* Returns a BiObservable that applies a specified function to each pair of items emitted by the
323-
* source BiObservable and emits the results of these function applications, replacing the
322+
* Returns a DyadObservable that applies a specified function to each pair of items emitted by
323+
* the source DyadObservable and emits the results of these function applications, replacing the
324324
* second item with the results. This overload accepts a Func2 that will receive both items
325-
* emitted by the BiObservable as arguments.
325+
* emitted by the DyadObservable as arguments.
326326
*
327327
* @param func
328328
* the function used to produce the new value.
329-
* @return a BiObservable which transforms the first item emitted using the specified function.
329+
* @return a DyadObservable which transforms the first item emitted using the specified
330+
* function.
330331
*/
331332
public <R> DyadObservable<? extends R, ? extends T1> map1(final Func2<? super T0, ? super T1, ? extends R> func) {
332333
return lift(OperatorMapDual.dualMap1Operator(func));
333334
}
334335

335336
/**
336-
* Returns a BiObservable that applies a specified function to each pair of items emitted by the
337-
* source BiObservable and emits the results of these function applications, replacing the
337+
* Returns a DyadObservable that applies a specified function to each pair of items emitted by
338+
* the source DyadObservable and emits the results of these function applications, replacing the
338339
* second item with the results. This overload accepts a Func1 that will receive the first item
339-
* emitted by the BiObservable as an argument.
340+
* emitted by the DyadObservable as an argument.
340341
*
341342
* @param func
342343
* the function used to produce the new value.
343-
* @return a BiObservable which transforms the first item emitted using the specified function.
344+
* @return a DyadObservable which transforms the first item emitted using the specified
345+
* function.
344346
*/
345347
public <R> DyadObservable<? extends R, ? extends T1> map1(final Func1<? super T0, ? extends R> func) {
346348
return lift(OperatorMapDual.singleMap1Operator(func));
@@ -365,8 +367,8 @@ public static <T0, T1> DyadObservable<T0, T1> attach(Observable<? extends T0> ob
365367
// <a,b,c,d> -> <r,d>
366368
// <a,b,c,d> -> <r>
367369
/**
368-
* Returns a BiObservable that applies a specified function to each pair of items emitted by the
369-
* source BiObservable and emits the results of these function applications, replacing the
370+
* Returns a DyadObservable that applies a specified function to each pair of items emitted by
371+
* the source DyadObservable and emits the results of these function applications, replacing the
370372
* emitted values with the result from the specified function.
371373
*
372374
* @param func
@@ -499,28 +501,30 @@ public void onComplete() {
499501
}
500502

501503
/**
502-
* Returns a BiObservable that applies a specified function to each pair of items emitted by the
503-
* source BiObservable and emits the results of these function applications, replacing the
504+
* Returns a DyadObservable that applies a specified function to each pair of items emitted by
505+
* the source DyadObservable and emits the results of these function applications, replacing the
504506
* second item with the results. This overload accepts a Func2 that will receive both items
505-
* emitted by the BiObservable as arguments.
507+
* emitted by the DyadObservable as arguments.
506508
*
507509
* @param func
508510
* the function used to produce the new value.
509-
* @return a BiObservable which transforms the second item emitted using the specified function.
511+
* @return a DyadObservable which transforms the second item emitted using the specified
512+
* function.
510513
*/
511514
public <R> DyadObservable<T0, R> map2(Func2<? super T0, ? super T1, ? extends R> func) {
512515
return lift(OperatorMapDual.dualMap2Operator(func));
513516
}
514517

515518
/**
516-
* Returns a BiObservable that applies a specified function to each pair of items emitted by the
517-
* source BiObservable and emits the results of these function applications, replacing the
519+
* Returns a DyadObservable that applies a specified function to each pair of items emitted by
520+
* the source DyadObservable and emits the results of these function applications, replacing the
518521
* second item with the results. This overload accepts a Func1 that will receive the second item
519-
* emitted by the BiObservable as an argument.
522+
* emitted by the DyadObservable as an argument.
520523
*
521524
* @param func
522525
* the function used to produce the new value.
523-
* @return a BiObservable which transforms the second item emitted using the specified function.
526+
* @return a DyadObservable which transforms the second item emitted using the specified
527+
* function.
524528
*/
525529
public <R> DyadObservable<T0, R> map2(final Func1<? super T1, ? extends R> func) {
526530
return lift(OperatorMapDual.singleMap2Operator(func));

0 commit comments

Comments
 (0)