net.fortytwo.flow
Interface Mapping<D,R,C>

Type Parameters:
D - the argument data type
R - the solution data type
C - a helper type which provides "context" to the mapping

public interface Mapping<D,R,C>

A data transformer which takes individual data items of one type (the "arguments"), maps them to zero or more items of a second type (the "solutions") and pushes the solutions into a downstream Sink

Author:
Joshua Shinavier (http://fortytwo.net)

Method Summary
 void apply(D arg, Sink<R> solutions, C context)
          Applies the mapping to a single argument, producing zero or more solutions and passing them into a downstream Sink
 boolean isTransparent()
           
 

Method Detail

isTransparent

boolean isTransparent()
Returns:
whether this function is referentially transparent w.r.t. all of its parameters.

apply

void apply(D arg,
           Sink<R> solutions,
           C context)
           throws RippleException
Applies the mapping to a single argument, producing zero or more solutions and passing them into a downstream Sink

Parameters:
arg - the argument data item
solutions - the solutions the argument is mapped to
context - a helper object providing context (may be null)
Throws:
RippleException - if a data handling error occurs


Copyright © 2007-2014. All Rights Reserved.