org.apache.myfaces.trinidadinternal.agent.CapabilityMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trinidad-impl Show documentation
Show all versions of trinidad-impl Show documentation
Private implementation of the Apache MyFaces Trinidad project
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.trinidadinternal.agent;
import java.util.Set;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.AbstractMap;
import java.util.HashSet;
import java.util.Collections;
/**
* Pretty much the same Impl of UIX CapabilityMap, with following changes
* -- Actually a map implementation now
* -- added support to get Entries (To support a map interface)
* -- Also this impl assumes that the number of keys **will** change (increase) after init.
*
*/
// FIXME -= Simon Lessard =-
// This is another map that can accept both String and another type as keys.
// Shouldn't we force type safety with a single key type ?
// -= Adam Winer =-
// This, supports Strings and CapabilityKey. In theory, using
// CapabilityKey is faster, which lets our built-in renderers
// execute faster. A fair question is whether this is a real
// issue. At the moment, however, it is definitely the case
// that we are using CapabilityKey inside our code, and yet we
// haven't made the plunge to require everyone to use
// CapabilityKey on Agent (or make CapabilityKey public).
public class CapabilityMap extends AbstractMap