/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *    (C) 2008, GeoTools Project Managment Committee (PMC)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.factory;

import java.util.Map;
import java.awt.RenderingHints;


/**
 * Hints which should not be merged with global hints, usually because the global hints have
 * already been merged.
 *
 * @since 2.4
 * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/factory/StrictHints.java $
 * @version $Id: StrictHints.java 29058 2008-02-03 17:47:07Z desruisseaux $
 * @author Martin Desruisseaux
 */
class StrictHints extends Hints {
    /**
     * Creates a set of strict hints which is a copy of the specified hints.
     */
    public StrictHints(final Hints hints) {
        super(hints);
    }

    /**
     * An immutable set of empty hints.
     */
    static final class Empty extends StrictHints {
        /**
         * Creates an empty instance.
         */
        Empty() {
            super(null);
        }

        /**
         * Unsupported operation.
         */
        public void add(RenderingHints hints) {
            throw new UnsupportedOperationException();
        }

        /**
         * Unsupported operation.
         */
        public Object put(Object key, Object value) {
            throw new UnsupportedOperationException();
        }

        /**
         * Unsupported operation.
         */
        public void putAll(Map map) {
            throw new UnsupportedOperationException();
        }

        /**
         * Returns a modifiable copy.
         */
        public Object clone() {
            return new StrictHints(null);
        }
    }
}
