Re: Union of many vectors with unicity garantee
Monday, October 20, 2003 11:06 AM
addAll() will simply add all the elements without concern for unicity. For each element you want to add, you first need to check if the element is already present in the vector. This can be done with the contains() method (make sure the equals() is implemented for the type of the element you want to had, because contains() uses equals() to determine if the elements are equal).