01: //
02: // This file is part of the prose package.
03: //
04: // The contents of this file are subject to the Mozilla Public License
05: // Version 1.1 (the "License"); you may not use this file except in
06: // compliance with the License. You may obtain a copy of the License at
07: // http://www.mozilla.org/MPL/
08: //
09: // Software distributed under the License is distributed on an "AS IS" basis,
10: // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11: // for the specific language governing rights and limitations under the
12: // License.
13: //
14: // The Original Code is prose.
15: //
16: // The Initial Developer of the Original Code is Andrei Popovici. Portions
17: // created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
18: // All Rights Reserved.
19: //
20: // Contributor(s):
21: //$Id: ObjectIdenticalToFilter.java,v 1.2 2003/07/17 11:14:16 apopovic Exp $
22: //=====================================================================
23: //
24: //(history at end)
25: //
26:
27: package ch.ethz.prose.filter;
28:
29: class ObjectIdenticalToFilter extends ObjectFilter {
30: private static final long serialVersionUID = 4051322349226112821L;
31: Object toBeComparedAgainst = null;
32:
33: protected ObjectIdenticalToFilter(int extrMode, Object other) {
34: super (extrMode);
35: toBeComparedAgainst = other;
36: if (other == null)
37: throw new IllegalArgumentException(
38: "Target.equal(): null argument");
39: }
40:
41: protected boolean doIsSpecialObject(Object target) {
42: return toBeComparedAgainst == target;
43: }
44: }
|