DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Collection Filter
// description of your code here
List<String> stringList=new ArrayList();
stringList.add("11");
stringList.add("21");
stringList.add("31");
stringList.add("101");
stringList.add("111");
Collection filteredCollection=CollectionUtils.select(stringList,new Predicate(){
public boolean evaluate(final Object dto) {
return (dto.startsWith("1"));
}
});





