@Test public void window() { final List<Double> results = new LinkedList<Double>(); EventWindow<Long, Double> w = Eep.sliding(new Stats.MeanLong(), 2); w.onEmit( new EventEmitter<Double>() { public void emit(Double event) { results.add(event); } }); w.push(1L); w.push(10L); w.push(2L); w.push(12L); assertEquals(new Double[] {5.5, 6., 7.}, results.toArray(new Double[] {})); }
public void clear() { eventWindow.clear(); }
public void inc() { eventWindow.inc(); }