Here you can find the source of toStringArray(List l)
Parameter | Description |
---|---|
l | _more_ |
public static String[] toStringArray(List l)
//package com.java2s; /*/*from w ww. j a v a2 s .c om*/ * Copyright (c) 2008-2015 Geode Systems LLC * This Software is licensed under the Geode Systems RAMADDA License available in the source distribution in the file * ramadda_license.txt. The above copyright notice shall be included in all copies or substantial portions of the Software. */ import java.util.List; public class Main { /** * _more_ * * @param l _more_ * * @return _more_ */ public static String[] toStringArray(List l) { String[] a = new String[l.size()]; for (int i = 0; i < l.size(); i++) { Object o = l.get(i); if (o == null) { a[i] = null; } else { a[i] = o.toString(); } } return a; } /** * _more_ * * @param o _more_ * * @return _more_ */ public static String toString(Object o) { if (o == null) { return ""; } return o.toString(); } }