Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/FastAnnotations.java @ 3324:290189f07809
Added filter for annotation names.
flys-backend/trunk@4634 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 11 Jun 2012 12:17:11 +0000 |
parents | 07c96cd39360 |
children | 96bd63281af7 |
comparison
equal
deleted
inserted
replaced
3323:07c96cd39360 | 3324:290189f07809 |
---|---|
140 | 140 |
141 boolean accept(Annotation annotation); | 141 boolean accept(Annotation annotation); |
142 | 142 |
143 } // interface Filter | 143 } // interface Filter |
144 | 144 |
145 public static class NameFilter implements Filter{ | |
146 | |
147 private String name; | |
148 | |
149 public NameFilter (String name) { | |
150 this.name = name; | |
151 } | |
152 | |
153 public boolean accept (Annotation annotation) { | |
154 return annotation.getName().contains(name); | |
155 } | |
156 } | |
157 | |
145 public static final Filter ALL = new Filter() { | 158 public static final Filter ALL = new Filter() { |
146 @Override | 159 @Override |
147 public boolean accept(Annotation annotation) { | 160 public boolean accept(Annotation annotation) { |
148 return true; | 161 return true; |
149 } | 162 } |