Here you can find the source of trim(final List
Parameter | Description |
---|---|
row | a parameter |
private static List<String> trim(final List<String> row)
//package com.java2s; /**/* ww w .j a v a 2 s. c om*/ * @UNCC Fodor Lab * @author Michael Sioda * @email msioda@uncc.edu * @date Feb 9, 2017 * @disclaimer This code 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, * provided that any use properly credits the author. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details at http://www.gnu.org * */ import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class Main { /** * Trim all values in row. * @param row * @return */ private static List<String> trim(final List<String> row) { final List<String> formattedRow = new ArrayList<>(); final Iterator<String> it = row.iterator(); while (it.hasNext()) { formattedRow.add(it.next().trim()); } return formattedRow; } }