Android Utililty Methods List Search

List of utility methods to do List Search


The list of methods to do List Search are organized into topic(s).


booleanstrIsInList(String srcStr, List orgList)
str Is In List
if (orgList == null)
    return true;
for (String strList : orgList)
    if (strList.equals(srcStr))
        return false;
return true;
DoublegetMax(List ids_int)
get Max
Double max = Double.MIN_VALUE;
for (int i = 0; i < ids_int.size(); i++) {
    if (ids_int.get(i) > max) {
        max = ids_int.get(i);
return max;
booleanisIntListContinous(List list)
is Int List Continous
if (list.isEmpty())
    return true;
int curr = list.get(0);
for (int i = 0; i < list.size(); i++) {
    if (list.get(i) != curr)
        return false;
return true;