|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectClosure
public class Closure
A Closure is a function defined by code being interpreted (either a function definition or a lambda expression), rather than being one of the built-in functions such as +.
| Constructor Summary | |
|---|---|
Closure(java.lang.String parameter,
Expression body,
Environment env)
Creates a Closure with the specified components. |
|
| Method Summary | |
|---|---|
java.lang.Object |
apply(java.lang.Object argument)
Apply this function to a specified argument value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Closure(java.lang.String parameter,
Expression body,
Environment env)
parameter - the name used in the function for its inputbody - the expression evaluated when the function is usedenv - the environment in which the function was created| Method Detail |
|---|
public java.lang.Object apply(java.lang.Object argument)
Function
apply in interface Functionargument - the argument value
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||