net.fortytwo.flow.diff
Class Diff<T>
java.lang.Object
net.fortytwo.flow.diff.Diff<T>
- All Implemented Interfaces:
- DiffSink<T>, DiffSource<T>
public class Diff<T>
- extends Object
- implements DiffSink<T>, DiffSource<T>
A two-channel data pipeline which distinguishes between data items "added" and "removed"
- Author:
- Joshua Shinavier (http://fortytwo.net)
|
Constructor Summary |
Diff()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Diff
public Diff()
getPlus
public Sink<T> getPlus()
- Specified by:
getPlus in interface DiffSink<T>
- Returns:
- the sink for "added" data items
getMinus
public Sink<T> getMinus()
- Specified by:
getMinus in interface DiffSink<T>
- Returns:
- the sink for "removed" data items
clear
public void clear()
size
public int size()
writeTo
public void writeTo(DiffSink<T> sink)
throws RippleException
- Description copied from interface:
DiffSource
- Writes all of the data in this source to the specified diff sink
- Specified by:
writeTo in interface DiffSource<T>
- Parameters:
sink - the downstream recipient of the diff
- Throws:
RippleException - if a data handling error occurs
Copyright © 2007-2014. All Rights Reserved.