I have two lists which holds two different types of objects.
- Protocol(obj1)
- Sensor(obj2)
Protocol list is sorted based on a property(protocolId) using "Collections.sort" using comparator. Now both Protocol and Sensor objects has same property called "referenceName". Since the first list(protocol) is sorted, I want the second list(Sensor) to be sorted in the same order of the Protocol list using the property "referenceName".
Since the Comparator can only compare two objects with in the same list. I am facing problems with comparing the first list with the second. Could somebody help me out?
referenceNameunique?referenceName?