Cleaned up JavaAPI and added copyright header.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
This commit is contained in:
parent
344dab94f1
commit
1e75cd36ee
1 changed files with 14 additions and 11 deletions
|
|
@ -1,55 +1,58 @@
|
|||
/**
|
||||
* Copyright (C) 2009-2011 Typesafe Inc. <http://www.typesafe.com>
|
||||
*/
|
||||
|
||||
package akka.japi
|
||||
|
||||
import scala.Some
|
||||
|
||||
/**
|
||||
* A Function interface. Used to create first-class-functions is Java (sort of).
|
||||
* A Function interface. Used to create first-class-functions is Java.
|
||||
*/
|
||||
trait Function[T, R] {
|
||||
def apply(param: T): R
|
||||
}
|
||||
|
||||
/**
|
||||
* A Function interface. Used to create 2-arg first-class-functions is Java (sort of).
|
||||
* A Function interface. Used to create 2-arg first-class-functions is Java.
|
||||
*/
|
||||
trait Function2[T1, T2, R] {
|
||||
def apply(arg1: T1, arg2: T2): R
|
||||
}
|
||||
|
||||
/**
|
||||
* A Procedure is like a Function, but it doesn't produce a return value
|
||||
* A Procedure is like a Function, but it doesn't produce a return value.
|
||||
*/
|
||||
trait Procedure[T] {
|
||||
def apply(param: T): Unit
|
||||
def apply(param: T)
|
||||
}
|
||||
|
||||
/**
|
||||
* A Procedure is like a Function, but it doesn't produce a return value
|
||||
* A Procedure is like a Function, but it doesn't produce a return value.
|
||||
*/
|
||||
trait Procedure2[T1, T2] {
|
||||
def apply(param: T1, param2: T2): Unit
|
||||
def apply(param: T1, param2: T2)
|
||||
}
|
||||
|
||||
/**
|
||||
* An executable piece of code that takes no parameters and doesn't return any value.
|
||||
*/
|
||||
trait SideEffect {
|
||||
def apply: Unit
|
||||
def apply()
|
||||
}
|
||||
|
||||
/**
|
||||
* An executable piece of code that takes no parameters and doesn't return any value.
|
||||
*/
|
||||
trait Effect {
|
||||
def apply: Unit
|
||||
def apply()
|
||||
}
|
||||
|
||||
/**
|
||||
* + * 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.
|
||||
*/
|
||||
trait Creator[T] {
|
||||
def create: T
|
||||
def create(): T
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue