Package java.util

Examples of java.util.HashMap.clone()


                childHash.put("total_digits", hashContentsElements.get("TOTAL_DIGITS"));
                childHash.put("min_occurs", hashContentsElements.get("MIN_OCCURS")  );
                childHash.put("max_occurs", hashContentsElements.get("MAX_OCCURS") );
                childHash.put("column_name", hashContentsElements.get("COLUMN_NAME") );
                childHash.put("content_id", sContentID);
                allTags.add(childHash.clone());
           
            }
                       
           
        } catch (Exception e) {
View Full Code Here


                           childHash2.put("TAG_TYPE", childHash.get("tag_type"));
                           childHash2.put("GROUPABLE", childHash.get("groupable"));              
                           childHash2.put("CONTENT_ELEMENT_ID", childHash.get("content_element_id"));
                           childHash.put("PARENT", childHash.get("parent"));
                                                     
                           childList.add(childHash2.clone());
                       }
                   }                              
                }
                if (allChildrenFromParent.size() == 0) {
                    HashMap st = new HashMap();                   
View Full Code Here

                    st.put("TAG_NAME", startTag.get("tag_name"));
                    st.put("TAG_TYPE", "0");
                    st.put("GROUPABLE", "0");              
                    st.put("CONTENT_ELEMENT_ID", startTag.get("content_element_id"));
                    st.put("PARENT", "0");
                    allChildrenFromParent.put("0", st.clone());
                }
                allChildrenFromParent.put(parentId, childList.clone());
               
                childList.clear();
               }                            
View Full Code Here

                {
                    throw new TurbineException(
                            "Incorrect factory " + (String) factory +
                            " for class " + className, x);
                }
                factories = (HashMap) factories.clone();
                factories.put(className, factory);
                objectFactories = factories;
            }
            return (Factory) factory;
        }
View Full Code Here

            String className = instance.getClass().getName();
            PoolBuffer pool = (PoolBuffer) repository.get(className);
            if (pool == null)
            {
                pool = new PoolBuffer(getCapacity(className));
                repository = (HashMap) repository.clone();
                repository.put(className, pool);
                poolRepository = repository;

                if (instance instanceof ArrayCtorRecyclable)
                {
View Full Code Here

    public void setCapacity(String className,
                            int capacity)
    {
        HashMap repository = poolRepository;
        repository = (repository != null)
                ? (HashMap) repository.clone() : new HashMap();

        capacity = (capacity <= 0) ? poolCapacity : capacity;

        repository.put(className, new PoolBuffer(capacity));
        poolRepository = repository;
View Full Code Here

    public void clearPool(String className)
    {
        HashMap repository = poolRepository;
        if (repository.get(className) != null)
        {
            repository = (HashMap) repository.clone();
            repository.remove(className);
            poolRepository = repository;
        }
    }
View Full Code Here

    Collection values = map.values();
    assertEquals("values() does not work",
        "value", values.iterator().next());
    assertEquals("keySet() does not work",
        "key", keys.iterator().next());
    AbstractMap map2 = (AbstractMap) map.clone();
    map2.put("key", "value2");
    Collection values2 = map2.values();
    assertTrue("values() is identical", values2 != values);
    // values() and keySet() on the cloned() map should be different
    assertEquals("values() was not cloned",
View Full Code Here

    public synchronized void setCharSet(String key,
                                        String charset)
    {
        HashMap mapper = (HashMap) mappers[MAP_PROG];
        mapper = mapper != null ?
                (HashMap) mapper.clone() : new HashMap();
        mapper.put(key, charset);
        mappers[MAP_PROG] = mapper;
        mappers[MAP_CACHE].clear();
    }
View Full Code Here

            String name = instance.getIntakeGroupName();
            PoolBuffer pool = (PoolBuffer) repository.get(name);
            if (pool == null)
            {
                pool = new PoolBuffer(instance.getPoolCapacity());
                repository = (HashMap) repository.clone();
                repository.put(name,pool);
                poolRepository = repository;
            }
            return pool.offer(instance);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.