开发者

an excel filter

I have a program in wh开发者_运维问答ich I take a input from a cvs file and store them into a ArrayList of ArrayList. And I can sort them according to column but now I want to create like a filter so if a file has bunch of student age and birthday. I would like to display only certain age and may be birthdays from june to july. What do you guys think would be the best approach for this ?


I've used lambdaj.

Take a look at sample :

List<Person> sortedByAgePersons = new ArrayList<Person>(persons);
Collections.sort(sortedByAgePersons, new Comparator<Person>() {
        public int compare(Person p1, Person p2) {
           return Integer.valueOf(p1.getAge()).compareTo(p2.getAge());
        }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜