Package java.util

Examples of java.util.WeakHashMap


     * @param capacity the initial capacity
     * @param loadFactor the load factor
     * @return a new Map used for internal caching
     */
    protected Map createTable(int capacity, float loadFactor) {
        return new WeakHashMap(capacity, loadFactor);
    }
View Full Code Here


         if (conn != null)
            this.pool.releaseConnection(conn, success);
      }

      Hashtable names = pool.getMapping();
      this.listener = new WeakHashMap();

      this.stringTxt = (String)names.get("string");
      if (this.stringTxt == null) this.stringTxt = "text";

      this.longintTxt = (String)names.get("longint");
View Full Code Here

  public DBLanguages() {
    oTranslations = null;
    oCountries = null;
    oHTMLCache = new HashMap(83);
    oCountryCacheHtml = new HashMap(387);
  oStateCacheHtml = new WeakHashMap(387);
  oStateCacheText = new WeakHashMap(387);
    bLoaded = false;
    bCountries = false;
  }
View Full Code Here

  /**
   * Create empty WorkArea.
   */
  public WorkArea() {
    super(DB.k_workareas, "WorkArea");
    oParams = new WeakHashMap();
  }
View Full Code Here

   * @throws SQLException
   */
  public WorkArea(JDCConnection oConn, String sIdWorkArea) throws SQLException {
    super(DB.k_workareas, "WorkArea");

    oParams = new WeakHashMap();

    Object aWrkA[] = { sIdWorkArea };

    load (oConn,aWrkA);
  }
View Full Code Here

            // Copy tmp starting at index 2, since colorConvert seems
            // to be slightly more accurate for the third component!
            g8Tos8LUT[i] = tmp[j];
        }
        if (g8Tos8Map == null) {
            g8Tos8Map = Collections.synchronizedMap(new WeakHashMap(2));
        }
        g8Tos8Map.put(grayCS, g8Tos8LUT);
        return g8Tos8LUT;
    }
View Full Code Here

            // scale unsigned short (0 - 65535) to unsigned byte (0 - 255)
            lg16Toog8LUT[i] =
                (byte) (((float) (tmp[i] & 0xffff)) * (1.0f /257.0f) + 0.5f);
        }
        if (lg16Toog8Map == null) {
            lg16Toog8Map = Collections.synchronizedMap(new WeakHashMap(2));
        }
        lg16Toog8Map.put(grayCS, lg16Toog8LUT);
        return lg16Toog8LUT;
    }
View Full Code Here

            // scale unsigned short (0 - 65535) to unsigned byte (0 - 255)
            g16Tos8LUT[i] =
                (byte) (((float) (tmp[j] & 0xffff)) * (1.0f /257.0f) + 0.5f);
        }
        if (g16Tos8Map == null) {
            g16Tos8Map = Collections.synchronizedMap(new WeakHashMap(2));
        }
        g16Tos8Map.put(grayCS, g16Tos8LUT);
        return g16Tos8LUT;
    }
View Full Code Here

        transformList[1] = new ICC_Transform (
            grayCS.getProfile(), ICC_Transform.Any, ICC_Transform.Out);
        ICC_Transform t = new ICC_Transform(transformList);
        short[] lg16Toog16LUT = t.colorConvert(tmp, null);
        if (lg16Toog16Map == null) {
            lg16Toog16Map = Collections.synchronizedMap(new WeakHashMap(2));
        }
        lg16Toog16Map.put(grayCS, lg16Toog16LUT);
        return lg16Toog16LUT;
    }
View Full Code Here

   * calls to Policy.implies or Policy.getPermissions.
   */
  PermissionCollection policyPerms = null;
  synchronized (p) {
     if (p.pdMapping == null) {
         p.pdMapping = new WeakHashMap();
     }
  }

  if (policyDomain.getCodeSource() != null) {
      if (Policy.isSet()) {
View Full Code Here

TOP

Related Classes of java.util.WeakHashMap

Copyright © 2018 www.massapicom. 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.