Increases the capacity of this set instance, if necessary.
Increases the capacity of this set instance, if necessary.For hash sets this method ensures that the set can hold at least the number of elements specified by the minimum capacity argument.
For tree sets this method does nothing, it justs returns the value of parameter minCapacity.
If the set is a hash set and if the capacity is actually increased, this method has a memory and time complexity of O(N), with N being the new capacity of the set.
In all other cases this method has a time complexity of O(1).