net.sf.doolin.gui.action.support
Class ConverterDelegate<S,T>

java.lang.Object
  extended by net.sf.doolin.gui.action.support.ConverterDelegate<S,T>
Type Parameters:
S - Type of the source parameter
T - Type of the target parameter
All Implemented Interfaces:
ActionDelegate<S>

public class ConverterDelegate<S,T>
extends Object
implements ActionDelegate<S>

Delegates that operates a transformation on the parameter before delegating to another delegate.

Author:
Damien Coraboeuf (x74639)

Constructor Summary
ConverterDelegate()
           
 
Method Summary
 void call(ActionContext actionContext, S parameter)
          Calls the delegate
 com.google.common.base.Function<S,T> getConverter()
          Gets the converter.
 ActionDelegate<T> getDelegate()
          Gets the delegate.
 void setConverter(com.google.common.base.Function<S,T> converter)
          Sets the converter.
 void setDelegate(ActionDelegate<T> delegate)
          Sets the delegate to call after conversion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterDelegate

public ConverterDelegate()
Method Detail

call

public void call(ActionContext actionContext,
                 S parameter)
Description copied from interface: ActionDelegate
Calls the delegate

Specified by:
call in interface ActionDelegate<S>
Parameters:
actionContext - Action context
parameter - Parameter

getConverter

public com.google.common.base.Function<S,T> getConverter()
Gets the converter.

Returns:
the converter

getDelegate

public ActionDelegate<T> getDelegate()
Gets the delegate.

Returns:
the delegate

setConverter

public void setConverter(com.google.common.base.Function<S,T> converter)
Sets the converter.

Parameters:
converter - the converter

setDelegate

public void setDelegate(ActionDelegate<T> delegate)
Sets the delegate to call after conversion.

Parameters:
delegate - the new delegate


Copyright © 2011. All Rights Reserved.