+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:
Patrik Nordwall 2014-05-14 14:17:10 +02:00
parent a306088584
commit 0c878f23d0

View file

@ -45,6 +45,19 @@ trait Effect {
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.
*/