sysModel.env
Class DeactivatableLambda

java.lang.Object
  extended by sysModel.env.DeactivatableLambda
All Implemented Interfaces:
ILambda

public class DeactivatableLambda
extends java.lang.Object
implements ILambda

Decorator for a lambda to make it deactivatable.

Author:
Mathias G. Ricken

Field Summary
private  ILambda _decoree
          Decorated command.
 
Constructor Summary
DeactivatableLambda(ILambda wrapped)
          Make a new deactivatable command.
 
Method Summary
 java.lang.Object apply(java.lang.Object param)
          Execute the wrapped command only if action is activated.
 void deactivate()
          Deactivate action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_decoree

private ILambda _decoree
Decorated command.

Constructor Detail

DeactivatableLambda

public DeactivatableLambda(ILambda wrapped)
Make a new deactivatable command.

Parameters:
wrapped - command to make deactivatable
Method Detail

apply

public java.lang.Object apply(java.lang.Object param)
Execute the wrapped command only if action is activated.

Specified by:
apply in interface ILambda
Parameters:
param - parameter for the decoree
Returns:
return value of the decoree

deactivate

public void deactivate()
Deactivate action.