class ActivityEventProcessor {

	public List<ActivityInterval> consume(Iterable<ActivityEvent> events) {
		long lastBucket = toBucket(endTime);
		ActivityEventBucket consumer = new ActivityEventBucket(lastBucket);
		for(ActivityEvent event: events) {
			event = filter(event);
			consumer = consumer.update(event);
		}
		return toIntervals(consumer);
	}

	public  ActivityEventProcessor(Date startTime, Date endTime, int bucketSizeMs);
	public  ActivityEventProcessor(Date startTime, Date endTime, int bucketSizeMs, Set<String> filter);

}