Skip to content

Commit b90634d

Browse files
improve scaladoc
1 parent df0436c commit b90634d

File tree

7 files changed

+213
-142
lines changed

7 files changed

+213
-142
lines changed

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/ImplicitFunctionConversions.scala

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -45,41 +45,26 @@ object ImplicitFunctionConversions {
4545
}
4646
}
4747

48-
/**
49-
* Converts a by-name parameter to a Rx Func0
50-
*/
5148
implicit def scalaByNameParamToFunc0[B](param: => B): Func0[B] =
5249
new Func0[B] {
5350
def call(): B = param
5451
}
5552

56-
/**
57-
* Converts 0-arg function to Rx Action0
58-
*/
5953
implicit def scalaFunction0ProducingUnitToAction0(f: (() => Unit)): Action0 =
6054
new Action0 {
6155
def call(): Unit = f()
6256
}
6357

64-
/**
65-
* Converts 1-arg function to Rx Action1
66-
*/
6758
implicit def scalaFunction1ProducingUnitToAction1[A](f: (A => Unit)): Action1[A] =
6859
new Action1[A] {
6960
def call(a: A): Unit = f(a)
7061
}
7162

72-
/**
73-
* Converts 1-arg predicate to Rx Func1[A, java.lang.Boolean]
74-
*/
7563
implicit def scalaBooleanFunction1ToRxBooleanFunc1[A](f: (A => Boolean)): Func1[A, jlang.Boolean] =
7664
new Func1[A, jlang.Boolean] {
7765
def call(a: A): jlang.Boolean = f(a).booleanValue
7866
}
7967

80-
/**
81-
* Converts 2-arg predicate to Rx Func2[A, B, java.lang.Boolean]
82-
*/
8368
implicit def scalaBooleanFunction2ToRxBooleanFunc1[A, B](f: ((A, B) => Boolean)): Func2[A, B, jlang.Boolean] =
8469
new Func2[A, B, jlang.Boolean] {
8570
def call(a: A, b: B): jlang.Boolean = f(a, b).booleanValue
@@ -90,34 +75,21 @@ object ImplicitFunctionConversions {
9075
def call(args: java.lang.Object*): R = f(args)
9176
}
9277

93-
/**
94-
* Converts a specific function shape (used in takeWhile) to the equivalent Java types with an Rx Func2
95-
*/
9678
implicit def convertTakeWhileFuncToRxFunc2[A](f: (A, Int) => Boolean): Func2[A, jlang.Integer, jlang.Boolean] =
9779
new Func2[A, jlang.Integer, jlang.Boolean] {
9880
def call(a: A, b: jlang.Integer): jlang.Boolean = f(a, b).booleanValue
9981
}
10082

101-
/**
102-
* Converts a function shaped ilke compareTo into the equivalent Rx Func2
103-
*/
10483
implicit def convertComparisonFuncToRxFunc2[A](f: (A, A) => Int): Func2[A, A, jlang.Integer] =
10584
new Func2[A, A, jlang.Integer] {
10685
def call(a1: A, a2: A): jlang.Integer = f(a1, a2).intValue
10786
}
10887

109-
/**
110-
* This implicit allows Scala code to use any exception type and still work
111-
* with invariant Func1 interface
112-
*/
11388
implicit def exceptionFunction1ToRxExceptionFunc1[A <: Exception, B](f: (A => B)): Func1[Exception, B] =
11489
new Func1[Exception, B] {
11590
def call(ex: Exception): B = f(ex.asInstanceOf[A])
11691
}
11792

118-
/**
119-
* The following implicits convert functions of different arities into the Rx equivalents
120-
*/
12193
implicit def scalaFunction0ToRxFunc0[A](f: () => A): Func0[A] =
12294
new Func0[A] {
12395
def call(): A = f()

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Notification.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package rx.lang.scala
22

33
/**
4-
* Emitted by Observables returned by [[rx.lang.scala.Observable.materialize]].
4+
* Emitted by Observables returned by [[Observable.materialize]].
55
*/
66
sealed trait Notification[+T] {
77
def asJava: rx.Notification[_ <: T]

0 commit comments

Comments
 (0)