01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.ui.operations;
16:
17: /**
18: * Represents the Not element in the operation extension point.
19: * @author jones
20: * @since 1.1.0
21: */
22: public class Not implements OpFilter {
23:
24: private OpFilter filter;
25:
26: public Not(OpFilter filter) {
27: this .filter = filter;
28: }
29:
30: public boolean accept(Object object) {
31: return !filter.accept(object);
32: }
33:
34: public void addListener(IOpFilterListener listener) {
35: filter.addListener(listener);
36: }
37:
38: public boolean canCacheResult() {
39: return filter.canCacheResult();
40: }
41:
42: public boolean isBlocking() {
43: return filter.isBlocking();
44: }
45:
46: public void removeListener(IOpFilterListener listener) {
47: filter.removeListener(listener);
48: }
49:
50: }
|