This content has been marked as final. Show 3 replies
Strange, because if the contents are not objects the compare works:
Thanks for your reply,Then how to compare arrayCollection with Objects, This is urgent for me please help me out.
ArrayCollection contains function will try to compare the objects using == operator and so the comparison will be equal only if the object instances are same. You can try sorting the ArrayCollection by setting the sorting fields and then use the createCursor method which will return the the cursor of the type IViewCursor. This IViewCursor has methods called findAny and findFirst which will compare your objects based on the sorting fields.
Please find details on sorting an ArrayCollection at the URL below.
Or you can just loop through the objects and then compare.
Hope this helps.