+act Add japi.Pair and japi.Predicate for streams
(cherry picked from commit 42ce37bb57884c7051d46a1e80b4a4ba4187adf4) =act Add @SerialVersionUID to japi.Pair (cherry picked from commit adb2c9bdc20effc84132daaf37e563fb430bf230)
This commit is contained in:
parent
a306088584
commit
0c878f23d0
1 changed files with 13 additions and 0 deletions
|
|
@ -45,6 +45,19 @@ trait Effect {
|
||||||
def apply(): Unit
|
def apply(): Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Java API: Defines a criteria and determines whether the parameter meets this criteria.
|
||||||
|
*/
|
||||||
|
trait Predicate[T] {
|
||||||
|
def test(param: T): Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Java API: Represents a tuple of two elements.
|
||||||
|
*/
|
||||||
|
@SerialVersionUID(1L)
|
||||||
|
case class Pair[A, B](first: A, second: B)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor/factory, takes no parameters but creates a new value of type T every call.
|
* A constructor/factory, takes no parameters but creates a new value of type T every call.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue