Here you can find the source of containsColumnByAlias(List
public static boolean containsColumnByAlias(List<String> columns, String alias)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static final String AS = " as "; public static boolean containsColumnByAlias(List<String> columns, String alias) { for (String column : columns) { if (getColumnAlias(column).equals(alias)) { return true; }/*from w w w. j a v a 2 s .c om*/ } return false; } public static String getColumnAlias(String fullColumnName) { if (fullColumnName.contains(AS)) { int index = fullColumnName.indexOf(AS); return fullColumnName.substring(index + AS.length()); } else { return fullColumnName; } } }