private SortItem<T> getInmost() { SortItem<T> res = null; for (SortItem<T> o : list) { if (o.getWithin().isEmpty() && nobodyWantsAround(o)) { res = o; break; } } return res; }
private void remove(SortItem<T> item) { list.remove(item); for (SortItem<T> o : list) { o.getWithin().remove(item); } }