org.gcube.portlets.user.speciesdiscovery.server.stream
Class CounterAggregator<T>

java.lang.Object
  extended by org.gcube.portlets.user.speciesdiscovery.server.stream.CounterAggregator<T>
All Implemented Interfaces:
Aggregator<T,HashMap<String,Integer>>
Direct Known Subclasses:
FieldAggregator

public abstract class CounterAggregator<T>
extends Object
implements Aggregator<T,HashMap<String,Integer>>

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Field Summary
protected  HashMap<String,Integer> aggregation
           
protected  KeyProvider<T> keyProvider
           
protected  String name
           
 
Constructor Summary
CounterAggregator(String name, KeyProvider<T> keyProvider)
           
 
Method Summary
 void aggregate(T input)
           
 HashMap<String,Integer> getAggregation()
          
 String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

aggregation

protected HashMap<String,Integer> aggregation

keyProvider

protected KeyProvider<T> keyProvider
Constructor Detail

CounterAggregator

public CounterAggregator(String name,
                         KeyProvider<T> keyProvider)
Parameters:
name -
Method Detail

getName

public String getName()
Specified by:
getName in interface Aggregator<T,HashMap<String,Integer>>

aggregate

public void aggregate(T input)
Specified by:
aggregate in interface Aggregator<T,HashMap<String,Integer>>

getAggregation

public HashMap<String,Integer> getAggregation()

Specified by:
getAggregation in interface Aggregator<T,HashMap<String,Integer>>


Copyright © 2013. All Rights Reserved.