Here you can find the source of removeSortByColumnName(List
public static boolean removeSortByColumnName(List<String> sortProperty, List<Boolean> ascending, String columnName)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static boolean removeSortByColumnName(List<String> sortProperty, List<Boolean> ascending, String columnName) {/* w w w .j a v a 2 s . c o m*/ if (sortProperty == null) { return false; } int index = -1; for (int i = 0, size = sortProperty.size(); i < size; i++) { String sort = sortProperty.get(i); if (sort.equals(columnName)) { index = i; break; } } if (index != -1) { sortProperty.remove(index); ascending.remove(index); } return (index == 0); } }