@Test public void testProcess4() { LimitProcess limitProcess = new LimitProcess(SupportConst.I_TEN); IEvent[] events = new TupleEvent[SupportConst.I_TEN]; IEvent[] actualResult = limitProcess.process(events); IEvent[] expectedResult = events; Assert.assertEquals(expectedResult.length, actualResult.length); }
public IEvent[] process(IEvent[] theEvents) { if (null == theEvents || theEvents.length == 0 || theEvents.length <= limitNum) { return theEvents; } else { return Arrays.copyOfRange(theEvents, 0, limitNum); } }
LimitProcess implements Serializable { public IEvent[] process(IEvent[] theEvents) { if (null == theEvents || theEvents.length == 0 || theEvents.length <= limitNum) { return theEvents; } else { return Arrays.copyOfRange(theEvents, 0, limitNum); } } }
LimitProcess implements Serializable { public IEvent[] process(IEvent[] theEvents) { if (null == theEvents || theEvents.length == 0 || theEvents.length <= limitNum) { return theEvents; } else { return Arrays.copyOfRange(theEvents, 0, limitNum); } } LimitProcess(int limitNum); }
LimitProcess implements Serializable { public IEvent[] process(IEvent[] theEvents) { if (null == theEvents || theEvents.length == 0 || theEvents.length <= limitNum) { return theEvents; } else { return Arrays.copyOfRange(theEvents, 0, limitNum); } } LimitProcess(int limitNum); IEvent[] process(IEvent[] theEvents); }
LimitProcess implements Serializable { public IEvent[] process(IEvent[] theEvents) { if (null == theEvents || theEvents.length == 0 || theEvents.length <= limitNum) { return theEvents; } else { return Arrays.copyOfRange(theEvents, 0, limitNum); } } LimitProcess(int limitNum); IEvent[] process(IEvent[] theEvents);  }