Here you can find the source of appendToCollection(final Vector
synchronized static Vector<File> appendToCollection(final Vector<File> original, final File[] toAppend)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.Vector; public class Main { synchronized static Vector<File> appendToCollection(final Vector<File> original, final File[] toAppend) { Vector<File> toReturn = new Vector(original); for (int i = 0; i < toAppend.length; i++) { File file = toAppend[i]; toReturn.add(file);/* w w w . j av a 2 s .com*/ } return toReturn; } }