Here you can find the source of convertListToString(List> list)
Parameter | Description |
---|---|
list | a parameter |
public static String convertListToString(List<?> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**//from ww w .j a va2 s. co m * Transforms a list to a string which is passed to HSL API * * @param list * @return */ public static String convertListToString(List<?> list) { String output = null; try { for (int i = 0; i < list.size(); i++) { if (i == 0) output = list.get(i).toString(); else output += "|" + list.get(i).toString(); } return output; } catch (NullPointerException e) { return null; } } }