Here you can find the source of trimToList(String importOrder1)
public static List<String> trimToList(String importOrder1)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static List<String> trimToList(String importOrder1) { ArrayList<String> strings = new ArrayList<String>(); String[] split = importOrder1.split(";"); for (String s : split) { String trim = s.trim(); if (!trim.isEmpty()) { strings.add(trim);/*from w w w . j ava 2 s .c o m*/ } } return strings; } }