ArrayList<T> (AbstractPropertyContainer container) { final ArrayList<T> modifiableList; final List<T> list = get(container); if (list instanceof ArrayList) { modifiableList = (ArrayList<T>)list; } else { modifiableList = new ArrayList<>(list); set(container, modifiableList); } // remove nulls for (int i = modifiableList.size() - 1; i >= 0; --i) { if (modifiableList.get(i) == null) { modifiableList.remove(i); } } return modifiableList; }