- Type Parameters:
 
F - The accepting from type. 
T - The onward to type. 
- All Implemented Interfaces:
 
- java.util.function.Consumer<F>, BusFilter<F,T>, Outbound<T>
 
public class BusMap<F,T>
extends AbstractFilter<F,T>
implements BusFilter<F,T>
Description
Apply a Function to beans in a Bean Bus.Example
Apply a function to double the price on a Fruit bean.
 
<oddjob>
    <job>
        <bus:bus id="bean-bus" xmlns:bus="oddjob:beanbus">
            <of>
                <bus:driver>
                    <values>
                        <list>
                            <values>
                                <bean class="org.oddjob.beanbus.example.Fruit" quantity="42" type="Apple" price="25.5"/>
                                <bean class="org.oddjob.beanbus.example.Fruit" quantity="24" type="Banana" price="36.2"/>
                                <bean class="org.oddjob.beanbus.example.Fruit" quantity="15" type="Pear" price="40.4"/>
                            </values>
                        </list>
                    </values>
                </bus:driver>
                <bus:map>
                    <function>
                        <bean class="org.oddjob.beanbus.example.DoublePrice"/>
                    </function>
                </bus:map>
                <bus:collect id="results"/>
            </of>
        </bus:bus>
    </job>
</oddjob>
- Author:
 
- rob