net.fortytwo.flow.diff
Class Diff<T>

java.lang.Object
  extended by 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()
           
 
Method Summary
 void clear()
           
 Sink<T> getMinus()
           
 Sink<T> getPlus()
           
 int size()
           
 void writeTo(DiffSink<T> sink)
          Writes all of the data in this source to the specified diff sink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Diff

public Diff()
Method Detail

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.