class ListUtils {

    public static <Item> SparseBooleanArray getDeletions(@Nullable List<? extends Item> oldList, @NonNull List<? extends Item> newList) {
        SparseBooleanArray list = new SparseBooleanArray();
        if(oldList != null) {
            int size = oldList.size();
            for (int oldIndex = 0; oldIndex < size; oldIndex++) {
                Item itemFromOldList = oldList.get(oldIndex);
                if (newList.indexOf(itemFromOldList) == NOT_PRESENT) {
                    list.put(oldIndex, true);
                }
            }
        }
        return list;
    }

}