@Override public void clear() { for (Index i : index) { storage.removeItem(getId(i.getId())); } index.clear(); updateIndex(); }
@Override public void delete(long key) { for (Index i : index) { if (i.getId() == key) { index.remove(i); storage.removeItem(getId(key)); updateIndex(); break; } } }