Package java.util

Examples of java.util.HashMap.clone()


/*     */
/*     */   public synchronized HashMap tag(String name)
/*     */   {
/*  87 */     HashMap map = (HashMap)this.metaData.get(name);
/*  88 */     if (map == null) return null;
/*  89 */     return (HashMap)map.clone();
/*     */   }
/*     */
/*     */   public synchronized boolean hasTag(String name)
/*     */   {
/*  94 */     return this.metaData.get(name) != null;
View Full Code Here


    */
   public synchronized HashMap tag(String name)
   {
      HashMap map = (HashMap) metaData.get(name);
      if (map == null) return null;
      return (HashMap) map.clone();
   }

   /**
    * Indicates whether this instance contains metadata tagged with {@code name}.
    * 
View Full Code Here

   *            the corresponding charset.
   */
  public final synchronized void setCharSet(final String key, final 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

   public synchronized HashMap tag(String name)
   {
      HashMap map = (HashMap) metaData.get(name);
      if (map == null) return null;
      return (HashMap) map.clone();
   }

   public synchronized boolean hasTag(String name)
   {
      return metaData.get(name) != null;
View Full Code Here

   *            the corresponding charset.
   */
  public final synchronized void setCharSet(final String key, final 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

        catch (Exception e) {
          Logger.error(this,e.getMessage(),e);
        }

        Map unmodifiableUserInfo =
          Collections.unmodifiableMap((Map)userInfo.clone());

        // Custom user attributes

        Map cuaInstances = CollectionFactory.getHashMap();
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();
        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

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.