Package org.oddjob.beanbus.destinations
Class BusMap<F,T>
java.lang.Object
org.oddjob.beanbus.AbstractFilter<F,T>
org.oddjob.beanbus.destinations.BusMap<F,T>
- Type Parameters:
F- The accepting from type.T- The onward to type.
- Author:
- rob
Description
Apply aFunction to beans in a Bean Bus. If the result of the function. If the
function returns null then nothing is passed to the next component so this has the same effect as
an BeanFilterExample
Apply a function to double the price on aFruit bean.
<oddjob>
<job>
<bus:bus id="bean-bus" xmlns:bus="oddjob:beanbus">
<of>
<bus:driver>
<values>
<list>
<values>
<value value="#{25.5}"/>
<value value="#{36.2}"/>
<value value="#{40.4}"/>
</values>
</list>
</values>
</bus:driver>
<bus:map>
<function>
<value value="#{ function(x) { return x * 2 } }"/>
</function>
</bus:map>
<bus:collect id="results"/>
</of>
</bus:bus>
</job>
</oddjob>
-
Constructor Details
-
BusMap
public BusMap()
-
-
Method Details
-
filter
- Specified by:
filterin classAbstractFilter<F,T>
-
reset
public void reset() -
getFunction
-
setFunction
-
getCount
public int getCount()
-