Here you can find the source of addAll(Vector vector, Object[] copyFrom)
Parameter | Description |
---|---|
vector | here all items will be appended. |
copyFrom | array to append. |
public static void addAll(Vector vector, Object[] copyFrom)
//package com.java2s; /*/* w w w . j a va 2s .c om*/ The Bluetooth Library for client-server communication Copyright (C) 2006 Martin Vysny This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ import java.util.*; public class Main { /** * Appends all items from given array after last item of the vector. * <p/> * @param vector * here all items will be appended. * @param copyFrom * array to append. */ public static void addAll(Vector vector, Object[] copyFrom) { if (copyFrom == null) { return; } vector.ensureCapacity(vector.size() + copyFrom.length); for (int i = 0; i < copyFrom.length; i++) { vector.addElement(copyFrom[i]); } } }