intarsys runtime library

de.intarsys.tools.functor
Class ConstantFunctor

java.lang.Object
  extended by de.intarsys.tools.functor.CommonFunctor
      extended by de.intarsys.tools.functor.ConstantFunctor
All Implemented Interfaces:
IFunctor

public class ConstantFunctor
extends CommonFunctor

A common utility IFunctor returning a constant value.


Constructor Summary
ConstantFunctor(Object constant)
           
 
Method Summary
 Object getConstant()
           
 Object perform(IFunctorCall call)
          Perform the encapsulated business logic in the context defined in "call".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantFunctor

public ConstantFunctor(Object constant)
Method Detail

getConstant

public Object getConstant()

perform

public Object perform(IFunctorCall call)
               throws FunctorInvocationException
Description copied from interface: IFunctor
Perform the encapsulated business logic in the context defined in "call".

Parameters:
call - The call context
Returns:
The behavior execution result.
Throws:
FunctorInvocationException - An exception that raised while executing the business logic will be wrapped in a FunctorInvocationException.

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.