sjm.examples.sling
Class AssignFunctionCommand
java.lang.Object
|
+--sjm.imperative.Command
|
+--sjm.examples.sling.AssignFunctionCommand
- public class AssignFunctionCommand
- extends Command
This command, when executed, evaluates a function and sets
it as the value of a variable.
|
Method Summary |
void |
execute()
Evaluate the function and assign the resulting, new function
as the value of this object's variable. |
java.lang.String |
toString()
Returns a string description of this command. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
v
protected Variable v
f
protected SlingFunction f
AssignFunctionCommand
public AssignFunctionCommand(Variable v,
SlingFunction f)
- Construct a command to assign the supplied function to
the supplied variable.
- Parameters:
Variable - the variable to assign toSlingFunction - the function to evaluate and
assign to the variable at
execution time
execute
public void execute()
- Evaluate the function and assign the resulting, new function
as the value of this object's variable.
- Overrides:
- execute in class Command
toString
public java.lang.String toString()
- Returns a string description of this command.
- Overrides:
- toString in class java.lang.Object
- Returns:
- a string description of this command