1 | String lastFilter = "";↵ | | 1 | String lastFilter = "";↵
|
|
2 | public FilteringModel() {↵ | | 2 | public FilteringModel() {↵
|
3 | list = new ArrayList<IEventInfo>();↵ | | 3 | list = new ArrayList<IContactModelPartial>();↵
|
4 | filteredList = new ArrayList<IEventInfo>();↵ | | 4 | filteredList = new ArrayList<IContactModelPartial>();↵
|
5 | }↵ | | 5 | }↵
|
|
6 | public void addElement(IEventInfo element) {↵ | | 6 | public void addElement(IContactModelPartial element) {↵
|
7 | list.add(element);↵ | | 7 | list.add(element);↵
|
8 | filter(lastFilter);↵ | | 8 | filter(lastFilter);↵
|
9 | }↵ | | 9 | }↵
|
|
10 | public int getSize() {↵ | | 10 | public int getSize() {↵
|
11 | return filteredList.size();↵ | | 11 | return filteredList.size();↵
|
12 | }↵ | | 12 | }↵
|
|
13 | public Object getElementAt(int index) {↵ | | 13 | public Object getElementAt(int index) {↵
|
14 | Object returnValue;↵ | | 14 | Object returnValue;↵
|
15 | if (index < filteredList.size()) {↵ | | 15 | if (index < filteredList.size()) {↵
|
16 | returnValue = filteredList.get(index);↵ | | 16 | returnValue = filteredList.get(index);↵
|
17 | } else {↵ | | 17 | } else {↵
|
18 | returnValue = null;↵ | | 18 | returnValue = null;↵
|
19 | }↵ | | 19 | }↵
|
20 | return returnValue | | 20 | return returnValue
|