Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.share.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import org.apache.myfaces.trinidad.util.ArrayMap;
/**
* Implements a map between a namespace+key and a value.
* This unsynchronized class is optimized for a small number of
* namespaces.
* @version $Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/util/NamespaceMap.java#0 $) $Date: 10-nov-2005.18:59:24 $
*/
public class NamespaceMap implements Cloneable
{
/**
* Creates a NamespaceMap, using a default size
* for the number of values per namespace.
*/
public NamespaceMap()
{
this(11);
}
/**
* Creates a NamespaceMap.
* @param defaultSize the default size of each per-namespace
* storage.
*/
public NamespaceMap(int defaultSize)
{
_defaultSize = defaultSize;
}
/**
* associates a value with a namespace and a key
* @param namespace namespace of the value
* @param key the key to associate the value with
* @param value the value to associate with the key.
*/
public void put(String namespace, Object key, Object value)
{
__put(namespace, key, value);
}
/**
* Returns the stored object.
* @param namespace the namespace to search.
* @param key the key to search the namespace for.
* @return null if such a namespace/key does not exist. else returns the
* associated value.
*/
@SuppressWarnings("unchecked")
public Object get(String namespace, Object key)
{
Map