Java List to String toString(final List list)

Here you can find the source of toString(final List list)

Description

to String

License

Open Source License

Declaration

public static List<String> toString(final List<? extends Object> list) 

Method Source Code


//package com.java2s;
/* *********************************************************************** *
 * project: org.matsim.*// w  w w .j  a  v  a2  s . co m
 * CollectionUtils.java
 *                                                                         *
 * *********************************************************************** *
 *                                                                         *
 * copyright       : (C) 2013 by the members listed in the COPYING,        *
 *                   LICENSE and WARRANTY file.                            *
 * email           : info at matsim dot org                                *
 *                                                                         *
 * *********************************************************************** *
 *                                                                         *
 *   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.                                   *
 *   See also COPYING, LICENSE and WARRANTY file                           *
 *                                                                         *
 * *********************************************************************** */

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> toString(final List<? extends Object> list) {
        final List<String> strings = new ArrayList<String>(list.size());
        for (Object o : list)
            strings.add(o.toString());
        return strings;
    }
}

Related

  1. listToString(List list)
  2. listToString(List list)
  3. listToString(List list, String prefix, String delimiter, String suffix)
  4. listToString(List list, String sep)
  5. listToString(String itemName, List list)
  6. toString(final List list, final String separtor)
  7. toString(final List list)
  8. toString(final List inMessages)
  9. toString(final List input)