Here you can find the source of convertVectorToStringArray(Vector vector)
Parameter | Description |
---|---|
vector | The Vector to convert |
public static String[] convertVectorToStringArray(Vector vector)
//package com.java2s; /* IBS Copyright/Security Notice *************************************** * * BAP Property of IBS AB//from w ww .ja v a 2 s . c o m * (C) Copyright IBS AB 2001-2003 * All rights reserved. * Use, duplication, or disclosure restricted * by license agreement with IBS AB. * * Licensed Materials - Property of IBS AB * * End IBS Copyright/Security Notice ********************************** * * * User Date Comment * --------------------------------------------------------------------- * DMA 01/01/2000 Class created * ***********************************************************************/ import java.util.*; public class Main { /** * Convert the passed vector into a string array * * @param vector The Vector to convert * @return an array of strings. */ public static String[] convertVectorToStringArray(Vector vector) { if (vector == null) return new String[0]; String[] arr = new String[vector.size()]; for (int i = 0; i < vector.size(); i++) arr[i] = vector.elementAt(i).toString(); return arr; } }