@Test public void testAggregateMaxFilter() { agg = new AggregateMaxFilter(Integer.class); assertEquals(Integer.class, agg.getValueType()); assertEquals(null, agg.getValue()); agg.enter(SupportConst.I_TEN, true); assertEquals(SupportConst.I_TEN, agg.getValue()); agg.enter(SupportConst.I_TEN, true); assertEquals(SupportConst.I_TEN, agg.getValue()); agg.enter(SupportConst.I_TWO, true); assertEquals(SupportConst.I_TEN, agg.getValue()); agg.leave(SupportConst.I_TEN, true); assertEquals(SupportConst.I_TEN, agg.getValue()); agg.leave(SupportConst.I_TEN, true); assertEquals(SupportConst.I_TWO, agg.getValue()); agg.leave(SupportConst.I_TWO, true); assertEquals(null, agg.getValue()); agg.enter(SupportConst.I_TWO, true); assertEquals(SupportConst.I_TWO, agg.getValue()); agg.enter(SupportConst.I_TEN, false); assertEquals(SupportConst.I_TWO, agg.getValue()); agg.leave(SupportConst.I_TEN, false); assertEquals(SupportConst.I_TWO, agg.getValue()); agg.leave(SupportConst.I_TWO, true); assertEquals(null, agg.getValue()); agg = new AggregateMaxFilter(Long.class); assertEquals(Long.class, agg.getValueType()); assertEquals(null, agg.getValue()); agg.enter(SupportConst.L_TEN, true); assertEquals(SupportConst.L_TEN, agg.getValue()); agg.enter(SupportConst.L_TEN, true); assertEquals(SupportConst.L_TEN, agg.getValue()); agg.enter(SupportConst.L_TWO, true); assertEquals(SupportConst.L_TEN, agg.getValue()); agg.leave(SupportConst.L_TEN, true); assertEquals(SupportConst.L_TEN, agg.getValue()); agg.leave(SupportConst.L_TEN, true); assertEquals(SupportConst.L_TWO, agg.getValue()); agg.leave(SupportConst.L_TWO, true); assertEquals(null, agg.getValue()); agg.enter(SupportConst.L_TWO, true); assertEquals(SupportConst.L_TWO, agg.getValue()); agg.enter(SupportConst.L_TEN, false); assertEquals(SupportConst.L_TWO, agg.getValue()); agg.leave(SupportConst.L_TEN, false); assertEquals(SupportConst.L_TWO, agg.getValue()); agg.leave(SupportConst.L_TWO, true); assertEquals(null, agg.getValue()); agg = new AggregateMaxFilter(Double.class); assertEquals(Double.class, agg.getValueType()); assertEquals(null, agg.getValue()); agg.enter(SupportConst.D_TEN, true); assertEquals(SupportConst.D_TEN, agg.getValue()); agg.enter(SupportConst.D_TEN, true); assertEquals(SupportConst.D_TEN, agg.getValue()); agg.enter(SupportConst.D_TWO, true); assertEquals(SupportConst.D_TEN, agg.getValue()); agg.leave(SupportConst.D_TEN, true); assertEquals(SupportConst.D_TEN, agg.getValue()); agg.leave(SupportConst.D_TEN, true); assertEquals(SupportConst.D_TWO, agg.getValue()); agg.leave(SupportConst.D_TWO, true); assertEquals(null, agg.getValue()); agg.enter(SupportConst.D_TWO, true); assertEquals(SupportConst.D_TWO, agg.getValue()); agg.enter(SupportConst.D_TEN, false); assertEquals(SupportConst.D_TWO, agg.getValue()); agg.leave(SupportConst.D_TEN, false); assertEquals(SupportConst.D_TWO, agg.getValue()); agg.leave(SupportConst.D_TWO, true); assertEquals(null, agg.getValue()); agg = new AggregateMaxFilter(Float.class); assertEquals(Float.class, agg.getValueType()); assertEquals(null, agg.getValue()); agg.enter(SupportConst.F_TEN, true); assertEquals(SupportConst.F_TEN, agg.getValue()); agg.enter(SupportConst.F_TEN, true); assertEquals(SupportConst.F_TEN, agg.getValue()); agg.enter(SupportConst.F_TWO, true); assertEquals(SupportConst.F_TEN, agg.getValue()); agg.leave(SupportConst.F_TEN, true); assertEquals(SupportConst.F_TEN, agg.getValue()); agg.leave(SupportConst.F_TEN, true); assertEquals(SupportConst.F_TWO, agg.getValue()); agg.leave(SupportConst.F_TWO, true); assertEquals(null, agg.getValue()); agg.enter(SupportConst.F_TWO, true); assertEquals(SupportConst.F_TWO, agg.getValue()); agg.enter(SupportConst.F_TEN, false); assertEquals(SupportConst.F_TWO, agg.getValue()); agg.leave(SupportConst.F_TEN, false); assertEquals(SupportConst.F_TWO, agg.getValue()); agg.leave(SupportConst.F_TWO, true); assertEquals(null, agg.getValue()); }
public AggregateMaxFilter(Class< ? > type) { super(type); }
AggregateMaxFilter extends AggregateMax { public AggregateMaxFilter(Class< ? > type) { super(type); } }
AggregateMaxFilter extends AggregateMax { public AggregateMaxFilter(Class< ? > type) { super(type); } AggregateMaxFilter(Class< ? > type); }
AggregateMaxFilter extends AggregateMax { public AggregateMaxFilter(Class< ? > type) { super(type); } AggregateMaxFilter(Class< ? > type); @Override void enter(Object value, boolean filter); @Override void leave(Object value, boolean filter); IAggregate cloneAggregate(); }
AggregateMaxFilter extends AggregateMax { public AggregateMaxFilter(Class< ? > type) { super(type); } AggregateMaxFilter(Class< ? > type); @Override void enter(Object value, boolean filter); @Override void leave(Object value, boolean filter); IAggregate cloneAggregate();  }