@Test public void testAdd() { Map<String, Object> values = new HashMap<String, Object>(); values.put("id", 1); values.put("description", "item:"); values.put("price", (double)SupportConst.I_TWENTY); events[0] = new TupleEvent("item", item, values); events[1] = new TupleEvent("item", item, values); collection.add(events); assertFalse(collection.isEmpty()); IEvent[] revents = new IEvent[SupportConst.I_TWO]; revents[0] = events[0]; collection.remove(revents); assertFalse(collection.isEmpty()); revents[0] = events[1]; collection.remove(revents); assertTrue(collection.isEmpty()); }
@Override public void add(IEvent[] events) { if (events == null) { return; } for (IEvent e : events) { keyBasedEvent.add(e); } }
SimpleEventCollection implements IEventCollection { @Override public void add(IEvent[] events) { if (events == null) { return; } for (IEvent e : events) { keyBasedEvent.add(e); } } }
SimpleEventCollection implements IEventCollection { @Override public void add(IEvent[] events) { if (events == null) { return; } for (IEvent e : events) { keyBasedEvent.add(e); } } SimpleEventCollection(String name, IEventType type); }
SimpleEventCollection implements IEventCollection { @Override public void add(IEvent[] events) { if (events == null) { return; } for (IEvent e : events) { keyBasedEvent.add(e); } } SimpleEventCollection(String name, IEventType type); @Override void addRemove(IEvent[] newData, IEvent[] oldData); @Override void add(IEvent[] events); @Override void remove(IEvent[] events); @Override boolean isEmpty(); @Override void clear(); @Override String getStreamName(); Set<IEvent> lookupAll(); Set<IEvent> lookupAllWithNull(); @Override IEvent genNullEvent(); }
SimpleEventCollection implements IEventCollection { @Override public void add(IEvent[] events) { if (events == null) { return; } for (IEvent e : events) { keyBasedEvent.add(e); } } SimpleEventCollection(String name, IEventType type); @Override void addRemove(IEvent[] newData, IEvent[] oldData); @Override void add(IEvent[] events); @Override void remove(IEvent[] events); @Override boolean isEmpty(); @Override void clear(); @Override String getStreamName(); Set<IEvent> lookupAll(); Set<IEvent> lookupAllWithNull(); @Override IEvent genNullEvent();  }