Here you can find the source of toStringArrayList(final Object... array)
Parameter | Description |
---|---|
array | The elements to be included in the returned ArrayList |
public static ArrayList<String> toStringArrayList(final Object... array)
//package com.java2s; import java.util.ArrayList; public class Main { /**//from w w w . ja v a2s . co m * @param array The elements to be included in the returned ArrayList * @return An ArrayList containing the String representation of the elements passed in via the array parameter */ public static ArrayList<String> toStringArrayList(final Object... array) { final ArrayList<String> retValue = new ArrayList<String>(); for (final Object item : array) retValue.add(item.toString()); return retValue; } }