Time complexity of hashset in java for adding, removing, or containing has a constant time complexity