public AnnotationDB search(AnnotationType at) { Set hits = new HashSet(); for (Iterator i = anns.iterator(); i.hasNext(); ) { Annotation ann = (Annotation) i.next(); hits.addAll(AnnotationTools.searchAnnotation(ann, at)); } if (hits.isEmpty()) { return AnnotationDB.EMPTY; } else { return new SimpleAnnotationDB("", hits, at); } }