org.apache.tapestry5.func
Class Mapper<S,T>

java.lang.Object
  extended by org.apache.tapestry5.func.Mapper<S,T>

public abstract class Mapper<S,T>
extends java.lang.Object

Base class used with Flow.map(Mapper) to define how Flow values are mapped from one type to another (or otherwise transformed).

Since:
5.2.0

Constructor Summary
Mapper()
           
 
Method Summary
<X> Mapper<S,X>
combine(Mapper<T,X> other)
          Combines this mapper (S -->T) with another mapper (T -->X) to form a composite mapper (S --> X).
abstract  T map(S value)
          Implemented in subclasses to map a source value to a target value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mapper

public Mapper()
Method Detail

map

public abstract T map(S value)
Implemented in subclasses to map a source value to a target value.


combine

public final <X> Mapper<S,X> combine(Mapper<T,X> other)
Combines this mapper (S -->T) with another mapper (T -->X) to form a composite mapper (S --> X).



Copyright © 2010-2011 Apache Software Foundation. All Rights Reserved.