We have an array of objects that have their 'IDs'.


Object { id = "test"}
Object { id = "test1"}
Object { id = "test2"}

Is it possible to understand what a change has occurred in this list once I know its original state?


  • added one or more new object only?
  • deleted one or more object only?
  • renamed one or more objects only?
  • added and renamed and deleted objects?

How can I distinguish these cases and is it possible without having any other information about them?


  • If all objects are deleted and after that added with the same IDs > in this case the operations that are used are not important once the final result is the same, for me these arrays are the same.

  • Each object has a unique ID

Note: if it matters, I use Java.

0 Answers