Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.cst.internal.util
Class CountingInstanceSink

java.lang.Object
  extended by eu.esdihumboldt.cst.internal.util.CountingInstanceSink
All Implemented Interfaces:
InstanceSink

public class CountingInstanceSink
extends Object
implements InstanceSink

Instance sink decorator that counts the added instances.

Author:
Simon Templer

Constructor Summary
CountingInstanceSink(InstanceSink decoratee)
          Create a counting instance sink
 
Method Summary
 void addInstance(Instance instance)
          Adds an instance to the sink
protected  void countChanged(int count)
          Called when the count has been incremented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingInstanceSink

public CountingInstanceSink(InstanceSink decoratee)
Create a counting instance sink

Parameters:
decoratee - the internal instance sink to use
Method Detail

addInstance

public void addInstance(Instance instance)
Description copied from interface: InstanceSink
Adds an instance to the sink

Specified by:
addInstance in interface InstanceSink
Parameters:
instance - the instance to add
See Also:
InstanceSink.addInstance(Instance)

countChanged

protected void countChanged(int count)
Called when the count has been incremented

Parameters:
count - the current count

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d