Here you can find the source of cloneListExcludingAttribute(String attribute, List
public static List<String> cloneListExcludingAttribute(String attribute, List<String> attributes)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> cloneListExcludingAttribute(String attribute, List<String> attributes) { List<String> clonedList = new ArrayList<>(attributes); clonedList.remove(attribute);/* w w w. j a v a2 s. c o m*/ return clonedList; } }