01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2008, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.factory;
17:
18: import java.util.Map;
19: import java.awt.RenderingHints;
20:
21: /**
22: * Hints which should not be merged with global hints, usually because the global hints have
23: * already been merged.
24: *
25: * @since 2.4
26: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/factory/StrictHints.java $
27: * @version $Id: StrictHints.java 29058 2008-02-03 17:47:07Z desruisseaux $
28: * @author Martin Desruisseaux
29: */
30: class StrictHints extends Hints {
31: /**
32: * Creates a set of strict hints which is a copy of the specified hints.
33: */
34: public StrictHints(final Hints hints) {
35: super (hints);
36: }
37:
38: /**
39: * An immutable set of empty hints.
40: */
41: static final class Empty extends StrictHints {
42: /**
43: * Creates an empty instance.
44: */
45: Empty() {
46: super (null);
47: }
48:
49: /**
50: * Unsupported operation.
51: */
52: public void add(RenderingHints hints) {
53: throw new UnsupportedOperationException();
54: }
55:
56: /**
57: * Unsupported operation.
58: */
59: public Object put(Object key, Object value) {
60: throw new UnsupportedOperationException();
61: }
62:
63: /**
64: * Unsupported operation.
65: */
66: public void putAll(Map map) {
67: throw new UnsupportedOperationException();
68: }
69:
70: /**
71: * Returns a modifiable copy.
72: */
73: public Object clone() {
74: return new StrictHints(null);
75: }
76: }
77: }
|