searching vectors
Hi all,
My problem is the following:
parsing a file I have to add elements to a vector only if I didn't add them before.
So I search the vector using the contains method: if it is false, I add the new element.
Unfortunately while vector is growing, the search slow down, and the code is totally unusable (we are speaking about several thousands elements)
Is there any other object rather than java.util.Vector to better do this job ? In example a sorted vector could be faster searchable, but perhaps slowly insertable..
Thanks all in advance,
Andrea

