Remove duplication from an array o object : I have an object like below,

    class LocationData{
     String time;
     String name;
     String address;
    }

for this object i have created getter setter.

By using service i fill this above model and save into room database.
whenever user open my app i just update the room database data to server using API.
Now sometimes the time duplication occurred. How to remove the object from based on time. time should be unique.


