Java List Trim trimStringToNewList(List list, Boolean isLower)

Here you can find the source of trimStringToNewList(List list, Boolean isLower)

Description

trim String To New List

License

Open Source License

Declaration

public static List<String> trimStringToNewList(List<String> list, Boolean isLower) 

Method Source Code

//package com.java2s;
/*/*from ww  w. java 2 s. com*/
 * Copyright (C) 2012 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> trimStringToNewList(List<String> list, Boolean isLower) {
        List<String> temp = new ArrayList<>();
        String str = null;
        for (int i = 0; i < list.size(); i++) {
            temp.add(isLower ? list.get(i).trim().toLowerCase() : list.get(i).trim());
        }
        return temp;
    }
}

Related

  1. trimList(List source)
  2. trimListValues(List original)
  3. trimSequence(int m, List sequence)
  4. trimStringLineList(List lines)
  5. trimStrings(List list)
  6. trimSuffix(List strs)
  7. trimToList(String importOrder1)
  8. trimToSize(List listToTrim, int size)