sorry for the poor explanation fo my problem , to be elaborative , well in my program i have vector defined like this
Vector tokenvector = new Vector();
this tokenvactor already has a value 12 inside
i have a method like this
public Collection getPattern(.....) this methods searches for a particular
pattern in a
string and then returns me the values of the patterns like 1000,2000,3000 (just assume that these are just numbers and nothing else) these values im getting them as collection(as defined by me in my method) i want to addthem to my vector tokenvector, and if i use vectors addAll(collection) then no problem my values are added but something like this [2000,3000],[12] but i want it to be like [2000,3000,12] together how can i do it thats my problem.
Another problem is that my vector has some values like []how can i remove them i did use
tokenValuesVector.removeAll(Collections.singleton(null)); but nothing works