1 package net.sf.flock.filter;
2
3 import java.util.List;
4
5 import net.sf.flock.FilterI;
6
7 public class Limit implements FilterI {
8
9 private final int limit;
10
11 public Limit(int limit) {
12 this.limit = limit;
13 }
14
15 public List filter(List items) {
16 return items.subList(0, Math.min(items.size(), this.limit));
17 }
18
19 }
This page was automatically generated by Maven