android - Why Google Guava Filter is not ignoring Case Sensitive Arraylist<String> -


i'm trying use google's guava in android app. used guava filter in 2 different files. in both files have arraylist of string type. in first working great expected in other code not working. don't know what's wrong in code. have checked in code did not understand problem. here first code working great! :)

list<string> list = new arraylist<>();                 list.addall(arraylist);                 list<string> filteredlist = lists.newarraylist(collections2.filter(                         list, predicates.contains(pattern.compile(newtext,pattern.case_insensitive)))); 

it working good. ignore case sensitive. second code:

 list<string> list = new arraylist<>();         list.addall(song_name);         list<string> filteredlist = lists.newarraylist(collections2.filter(                 list, predicates.contains(pattern.compile(query,pattern.case_insensitive)))); 

in above code when search string lower case result appears if string upper or in sentence case not working. so, not ignoring case sensitive. know what's problem code...


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -