@Test public void testRemove() { InMemoryObjectQueue<String> inMemoryObjectQueue = new InMemoryObjectQueue<>(); ArrayList<String> arrayList = new ArrayList<>(4); arrayList.add("test1"); arrayList.add("test2"); arrayList.add("test3"); arrayList.add("test4"); for (String sample : arrayList) { inMemoryObjectQueue.add(sample); } inMemoryObjectQueue.remove(arrayList.size()); inMemoryObjectQueue.remove(); }
@Override public void remove() { removeFromQueue(); if (listener != null) { listener.onRemove(this); } }
InMemoryObjectQueue implements ObjectQueue<T> { @Override public void remove() { removeFromQueue(); if (listener != null) { listener.onRemove(this); } } }
InMemoryObjectQueue implements ObjectQueue<T> { @Override public void remove() { removeFromQueue(); if (listener != null) { listener.onRemove(this); } } @SuppressWarnings("unchecked")  InMemoryObjectQueue(); }
InMemoryObjectQueue implements ObjectQueue<T> { @Override public void remove() { removeFromQueue(); if (listener != null) { listener.onRemove(this); } } @SuppressWarnings("unchecked")  InMemoryObjectQueue(); @Override void add(T entry); @Override T peek(); @Override int size(); @Override void remove(); @Override void remove(int n); @Override void close(); @Override void setListener(Listener<T> listener); @Override List<T> peek(final int max); }
InMemoryObjectQueue implements ObjectQueue<T> { @Override public void remove() { removeFromQueue(); if (listener != null) { listener.onRemove(this); } } @SuppressWarnings("unchecked")  InMemoryObjectQueue(); @Override void add(T entry); @Override T peek(); @Override int size(); @Override void remove(); @Override void remove(int n); @Override void close(); @Override void setListener(Listener<T> listener); @Override List<T> peek(final int max);  }