net.fortytwo.flow
Class DistinctFilter<T>
java.lang.Object
net.fortytwo.flow.DistinctFilter<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Sink<T>
public class DistinctFilter<T>
- extends Object
- implements Sink<T>
A "filter" pipeline which allows each distinct data item to pass only once.
Duplicates are filtered out rather than being passed to the downstream sink.
- Author:
- Joshua Shinavier (http://fortytwo.net)
|
Method Summary |
void |
put(T t)
Receives the next data item passed into this filter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistinctFilter
public DistinctFilter(Sink<T> sink)
- Constructs a new filter
- Parameters:
sink - the downstream sink to receive distinct data items
put
public void put(T t)
throws RippleException
- Receives the next data item passed into this filter
- Specified by:
put in interface Sink<T>
- Parameters:
t - the data item being passed
- Throws:
RippleException - if a data handling error occurs
Copyright © 2007-2014. All Rights Reserved.