public class DataCollector<IN> extends DataProcessor<IN,IN> implements IDataCollector<IN>
Void| Constructor and Description |
|---|
DataCollector(String id) |
| Modifier and Type | Method and Description |
|---|---|
void |
feed(IDataProcessor<IN,?> consumer)
Feed all collected data points to the consumer by calling the
consumers receive() method for each data point.
|
List<DataPoint<IN>> |
getDatapoints()
Retrieve an immutable set of all received data points
|
String |
getId()
Get the id of the collector.
|
Object[] |
getValues()
Get all received values
|
void |
receive(DataPoint<IN> datapoint)
Receive a new data point
|
void |
receive(IN value)
Convenience method to receive new values
|
int |
size()
The number of data points contained in this collector
|
String |
toString() |
add, connectTo, connectToequals, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, connectTo, connectTopublic DataCollector(String id)
public void receive(DataPoint<IN> datapoint)
IDataProcessorreceive in interface IDataProcessor<IN,IN>public void receive(IN value)
IDataProcessorreceive in interface IDataProcessor<IN,IN>receive in class DataProcessor<IN,IN>public void feed(IDataProcessor<IN,?> consumer)
IDataCollectorfeed in interface IDataCollector<IN>public int size()
IDataCollectorsize in interface IDataCollector<IN>public String getId()
IDataCollectorgetId in interface IDataCollector<IN>public List<DataPoint<IN>> getDatapoints()
IDataCollectorgetDatapoints in interface IDataCollector<IN>public Object[] getValues()
IDataCollectorgetValues in interface IDataCollector<IN>Copyright © 2016. All rights reserved.