This might look like a duplicate but it's not, read through the end please.
Some context : I'm building an android app that connect to an api. There's a checkbox of items "finishes" applied to a furniture object, when I'm updating the the finishes I must send back to the backend the finishes(checkbox)I want to delete. finishes_to_be_removed: []
and pass there ids in the array, while adding finishes is finishes: []
. The problem is, I want to find a way to diff the the two list generated from the checkboxes, the old one and the updated one. So I can populate the finishes_to_be_removed: []
.
I cannot use Java 8 Stream because my API level min is 15.
When I try list.contains(list2), it tells "List may not contains object of Type List.
I want to return items that are in the first list but that are not on the second list only, not a 1:1 comparison.