/* Removes descriptor from the list and returns it. Returns {@code null} if descriptor is not found */ private static Descriptor remove(ArrayList<Descriptor> list, Descriptor item) { if (list.remove(item)) return item; else return null; }