Here you can find the source of convertStringToEnumList(Class
public static <T extends Enum<T>> List<T> convertStringToEnumList(Class<T> enumType, List<String> stringList)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static <T extends Enum<T>> List<T> convertStringToEnumList(Class<T> enumType, List<String> stringList) { List<T> enumList = new ArrayList<T>(); for (String string : stringList) { enumList.add(Enum.valueOf(enumType, string)); }/*from w w w . j a v a 2 s . c o m*/ return enumList; } }