Compares the specified collection with this set for equality.
Compares the specified collection with this set for equality.Returns true if the specified collection is a collection, the two collections have the same size and every member of the specified collection is contained in this set.
In other words, two collections are defined to be equal as sets if they contain the same elements.
For hash sets this method has a time complexity of O(M) and for tree sets this method has a time complexity of O(M * Log N ), with N being the size of the set and M being the number of elements in the object compared.