added effect to java api

This commit is contained in:
Jonas Bonér 2010-11-24 14:49:10 +01:00
parent 5d436e3903
commit f21a83ec3c
2 changed files with 10 additions and 3 deletions

View file

@ -20,6 +20,13 @@ trait SideEffect {
def apply: Unit
}
/**
* An executable piece of code that takes no parameters and doesn't return any value.
*/
trait Effect {
def apply: Unit
}
/**
+ * A constructor/factory, takes no parameters but creates a new value of type T every call
+ */