p2izing the editor
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / navigation / SearchResult.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.taxeditor.navigation;
11
12 import java.util.ArrayList;
13 import java.util.Collection;
14 import java.util.Iterator;
15 import java.util.List;
16
17 import org.apache.log4j.Logger;
18
19 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
20
21 /**
22 * @author p.ciardelli
23 * @created 19.01.2009
24 * @version 1.0
25 */
26 public class SearchResult implements Collection<IdentifiableEntity> {
27 private static final Logger logger = Logger.getLogger(SearchResult.class);
28
29 List<IdentifiableEntity> searchResult = new ArrayList<IdentifiableEntity>();
30
31
32 public boolean add(IdentifiableEntity e) {
33 return searchResult.add(e);
34 }
35
36
37 public boolean addAll(Collection<? extends IdentifiableEntity> c) {
38 return searchResult.addAll(c);
39 }
40
41
42 public void clear() {
43 searchResult.clear();
44 }
45
46
47 public boolean contains(Object o) {
48 return searchResult.contains(o);
49 }
50
51
52 public boolean containsAll(Collection<?> c) {
53 return searchResult.containsAll(c);
54 }
55
56
57 public boolean isEmpty() {
58 return searchResult.isEmpty();
59 }
60
61
62 public Iterator<IdentifiableEntity> iterator() {
63 return searchResult.iterator();
64 }
65
66
67 public boolean remove(Object o) {
68 return searchResult.remove(o);
69 }
70
71
72 public boolean removeAll(Collection<?> c) {
73 return searchResult.removeAll(c);
74 }
75
76
77 public boolean retainAll(Collection<?> c) {
78 return searchResult.retainAll(c);
79 }
80
81
82 public int size() {
83 return searchResult.size();
84 }
85
86
87 public Object[] toArray() {
88 return searchResult.toArray();
89 }
90
91
92 public <T> T[] toArray(T[] a) {
93 return searchResult.toArray(a);
94 }
95
96 String searchString;
97
98 public String getSearchString() {
99 return searchString;
100 }
101
102 public void setSearchString(String searchString) {
103 this.searchString = searchString;
104 }
105 }