亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? hashmap.java

?? This is a resource based on j2me embedded,if you dont understand,you can connection with me .
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * @(#)HashMap.java	1.45 06/10/10 * * Copyright  1990-2008 Sun Microsystems, Inc. All Rights Reserved.   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER   *    * This program is free software; you can redistribute it and/or   * modify it under the terms of the GNU General Public License version   * 2 only, as published by the Free Software Foundation.    *    * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   * General Public License version 2 for more details (a copy is   * included at /legal/license.txt).    *    * You should have received a copy of the GNU General Public License   * version 2 along with this work; if not, write to the Free Software   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA   * 02110-1301 USA    *    * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa   * Clara, CA 95054 or visit www.sun.com if you need additional   * information or have any questions.  * */package java.util;import  java.io.*;/** * Hash table based implementation of the <tt>Map</tt> interface.  This * implementation provides all of the optional map operations, and permits * <tt>null</tt> values and the <tt>null</tt> key.  (The <tt>HashMap</tt> * class is roughly equivalent to <tt>Hashtable</tt>, except that it is * unsynchronized and permits nulls.)  This class makes no guarantees as to * the order of the map; in particular, it does not guarantee that the order * will remain constant over time. * * <p>This implementation provides constant-time performance for the basic * operations (<tt>get</tt> and <tt>put</tt>), assuming the hash function * disperses the elements properly among the buckets.  Iteration over * collection views requires time proportional to the "capacity" of the * <tt>HashMap</tt> instance (the number of buckets) plus its size (the number * of key-value mappings).  Thus, it's very important not to set the initial * capacity too high (or the load factor too low) if iteration performance is * important. * * <p>An instance of <tt>HashMap</tt> has two parameters that affect its * performance: <i>initial capacity</i> and <i>load factor</i>.  The * <i>capacity</i> is the number of buckets in the hash table, and the initial * capacity is simply the capacity at the time the hash table is created.  The * <i>load factor</i> is a measure of how full the hash table is allowed to * get before its capacity is automatically increased.  When the number of * entries in the hash table exceeds the product of the load factor and the * current capacity, the capacity is roughly doubled by calling the * <tt>rehash</tt> method. * * <p>As a general rule, the default load factor (.75) offers a good tradeoff * between time and space costs.  Higher values decrease the space overhead * but increase the lookup cost (reflected in most of the operations of the * <tt>HashMap</tt> class, including <tt>get</tt> and <tt>put</tt>).  The * expected number of entries in the map and its load factor should be taken * into account when setting its initial capacity, so as to minimize the * number of <tt>rehash</tt> operations.  If the initial capacity is greater * than the maximum number of entries divided by the load factor, no * <tt>rehash</tt> operations will ever occur. * * <p>If many mappings are to be stored in a <tt>HashMap</tt> instance, * creating it with a sufficiently large capacity will allow the mappings to * be stored more efficiently than letting it perform automatic rehashing as * needed to grow the table. * * <p><b>Note that this implementation is not synchronized.</b> If multiple * threads access this map concurrently, and at least one of the threads * modifies the map structurally, it <i>must</i> be synchronized externally. * (A structural modification is any operation that adds or deletes one or * more mappings; merely changing the value associated with a key that an * instance already contains is not a structural modification.)  This is * typically accomplished by synchronizing on some object that naturally * encapsulates the map.  If no such object exists, the map should be * "wrapped" using the <tt>Collections.synchronizedMap</tt> method.  This is * best done at creation time, to prevent accidental unsynchronized access to * the map: <pre> Map m = Collections.synchronizedMap(new HashMap(...)); * </pre> * * <p>The iterators returned by all of this class's "collection view methods" * are <i>fail-fast</i>: if the map is structurally modified at any time after * the iterator is created, in any way except through the iterator's own * <tt>remove</tt> or <tt>add</tt> methods, the iterator will throw a * <tt>ConcurrentModificationException</tt>.  Thus, in the face of concurrent * modification, the iterator fails quickly and cleanly, rather than risking * arbitrary, non-deterministic behavior at an undetermined time in the * future. * * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification.  Fail-fast iterators * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.  * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: <i>the fail-fast behavior of iterators * should be used only to detect bugs.</i> * * <p>This class is a member of the  * <a href="{@docRoot}/../guide/collections/index.html"> * Java Collections Framework</a>. * * @author  Doug Lea * @author  Josh Bloch * @author  Arthur van Hoff * @version 1.38, 02/02/00 * @see     Object#hashCode() * @see     Collection * @see	    Map * @see	    TreeMap * @see	    Hashtable * @since   1.2 */public class HashMap extends AbstractMap implements Map, Cloneable,    Serializable{    /**     * The default initial capacity - MUST be a power of two.     */    static final int DEFAULT_INITIAL_CAPACITY = 16;    /**     * The maximum capacity, used if a higher value is implicitly specified     * by either of the constructors with arguments.     * MUST be a power of two <= 1<<30.     */    static final int MAXIMUM_CAPACITY = 1 << 30;    /**     * The load factor used when none specified in constructor.     **/    static final float DEFAULT_LOAD_FACTOR = 0.75f;    /**     * The table, resized as necessary. Length MUST Always be a power of two.     */    transient Entry[] table;    /**     * The number of key-value mappings contained in this identity hash map.     */    transient int size;      /**     * The next size value at which to resize (capacity * load factor).     * @serial     */    int threshold;      /**     * The load factor for the hash table.     *     * @serial     */    final float loadFactor;    /**     * The number of times this HashMap has been structurally modified     * Structural modifications are those that change the number of mappings in     * the HashMap or otherwise modify its internal structure (e.g.,     * rehash).  This field is used to make iterators on Collection-views of     * the HashMap fail-fast.  (See ConcurrentModificationException).     */    transient volatile int modCount;    /**     * Constructs an empty <tt>HashMap</tt> with the specified initial     * capacity and load factor.     *     * @param  initialCapacity The initial capacity.     * @param  loadFactor      The load factor.     * @throws IllegalArgumentException if the initial capacity is negative     *         or the load factor is nonpositive.     */    public HashMap(int initialCapacity, float loadFactor) {        if (initialCapacity < 0)            throw new IllegalArgumentException("Illegal initial capacity: " +                                               initialCapacity);        if (initialCapacity > MAXIMUM_CAPACITY)            initialCapacity = MAXIMUM_CAPACITY;        if (loadFactor <= 0 || Float.isNaN(loadFactor))            throw new IllegalArgumentException("Illegal load factor: " +                                               loadFactor);        // Find a power of 2 >= initialCapacity        int capacity = 1;        while (capacity < initialCapacity)             capacity <<= 1;            this.loadFactor = loadFactor;        threshold = (int)(capacity * loadFactor);        table = new Entry[capacity];        init();    }      /**     * Constructs an empty <tt>HashMap</tt> with the specified initial     * capacity and the default load factor (0.75).     *     * @param  initialCapacity the initial capacity.     * @throws IllegalArgumentException if the initial capacity is negative.     */    public HashMap(int initialCapacity) {        this(initialCapacity, DEFAULT_LOAD_FACTOR);    }    /**     * Constructs an empty <tt>HashMap</tt> with the default initial capacity     * (16) and the default load factor (0.75).     */    public HashMap() {        this.loadFactor = DEFAULT_LOAD_FACTOR;        threshold = (int)(DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR);        table = new Entry[DEFAULT_INITIAL_CAPACITY];        init();    }    /**     * Constructs a new <tt>HashMap</tt> with the same mappings as the     * specified <tt>Map</tt>.  The <tt>HashMap</tt> is created with     * default load factor (0.75) and an initial capacity sufficient to     * hold the mappings in the specified <tt>Map</tt>.     *     * @param   m the map whose mappings are to be placed in this map.     * @throws  NullPointerException if the specified map is null.     */    public HashMap(Map m) {        this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1,                      DEFAULT_INITIAL_CAPACITY), DEFAULT_LOAD_FACTOR);        putAllForCreate(m);    }    // internal utilities    /**     * Initialization hook for subclasses. This method is called     * in all constructors and pseudo-constructors (clone, readObject)     * after HashMap has been initialized but before any entries have     * been inserted.  (In the absence of this method, readObject would     * require explicit knowledge of subclasses.)     */    void init() {    }    /**     * Value representing null keys inside tables.     */    static final Object NULL_KEY = new Object();    /**     * Returns internal representation for key. Use NULL_KEY if key is null.     */    static Object maskNull(Object key) {        return (key == null ? NULL_KEY : key);    }    /**     * Returns key represented by specified internal representation.     */    static Object unmaskNull(Object key) {        return (key == NULL_KEY ? null : key);    }    /**     * Returns a hash value for the specified object.  In addition to      * the object's own hashCode, this method applies a "supplemental     * hash function," which defends against poor quality hash functions.     * This is critical because HashMap uses power-of two length      * hash tables.<p>     *     * The shift distances in this function were chosen as the result     * of an automated search over the entire four-dimensional search space.     */    static int hash(Object x) {        int h = x.hashCode();        h += ~(h << 9);        h ^=  (h >>> 14);        h +=  (h << 4);        h ^=  (h >>> 10);        return h;    }    /**      * Check for equality of non-null reference x and possibly-null y.      */    static boolean eq(Object x, Object y) {        return x == y || x.equals(y);    }    /**     * Returns index for hash code h.      */    static int indexFor(int h, int length) {        return h & (length-1);    }     /**     * Returns the number of key-value mappings in this map.     *     * @return the number of key-value mappings in this map.     */    public int size() {        return size;    }      /**     * Returns <tt>true</tt> if this map contains no key-value mappings.     *     * @return <tt>true</tt> if this map contains no key-value mappings.     */    public boolean isEmpty() {        return size == 0;    }    /**     * Returns the value to which the specified key is mapped in this identity     * hash map, or <tt>null</tt> if the map contains no mapping for this key.     * A return value of <tt>null</tt> does not <i>necessarily</i> indicate     * that the map contains no mapping for the key; it is also possible that     * the map explicitly maps the key to <tt>null</tt>. The     * <tt>containsKey</tt> method may be used to distinguish these two cases.     *     * @param   key the key whose associated value is to be returned.     * @return  the value to which this map maps the specified key, or     *          <tt>null</tt> if the map contains no mapping for this key.     * @see #put(Object, Object)     */    public Object get(Object key) {        Object k = maskNull(key);        int hash = hash(k);        int i = indexFor(hash, table.length);        Entry e = table[i];         while (true) {            if (e == null)                return e;            if (e.hash == hash && eq(k, e.key))                 return e.value;            e = e.next;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩二区在线观看| 欧美日韩日本视频| 国产一区二区免费视频| 日韩成人dvd| 日韩av不卡在线观看| 亚洲电影视频在线| 亚洲国产精品久久人人爱蜜臀| 亚洲精品成人悠悠色影视| 亚洲免费av观看| 亚洲自拍欧美精品| 亚洲一区二区美女| 日韩精彩视频在线观看| 麻豆专区一区二区三区四区五区| 日韩影院在线观看| 免费成人你懂的| 韩国精品在线观看| 国产成人精品免费| 99精品在线观看视频| 91影视在线播放| 日韩黄色在线观看| 欧美一区二区视频免费观看| 91精品国产综合久久精品| 91精品在线观看入口| 日韩三级中文字幕| 久久综合狠狠综合久久综合88 | eeuss鲁一区二区三区| 大尺度一区二区| 9久草视频在线视频精品| 在线观看亚洲一区| 欧美一区二区视频在线观看| www日韩大片| 亚洲视频在线观看一区| 亚洲国产视频直播| 久久精品国内一区二区三区| 国产传媒欧美日韩成人| 色狠狠一区二区| 欧美男男青年gay1069videost| 日韩欧美一级片| 国产精品嫩草影院av蜜臀| 一区二区三区日本| 久久国产精品第一页| 成人福利视频网站| 欧美三级在线视频| 久久精品视频一区二区三区| 亚洲美女区一区| 久久99精品久久只有精品| 成人app软件下载大全免费| 欧美日韩一级二级| 久久―日本道色综合久久| 自拍视频在线观看一区二区| 日本午夜一区二区| 欧美影院午夜播放| 日韩欧美自拍偷拍| 中文字幕亚洲综合久久菠萝蜜| 亚洲va国产va欧美va观看| 国产v日产∨综合v精品视频| 欧美色手机在线观看| 久久综合成人精品亚洲另类欧美 | 欧美zozo另类异族| 成人免费在线视频| 美国av一区二区| 在线视频国内自拍亚洲视频| 久久先锋影音av| 亚洲福利一区二区三区| 成人一区在线观看| 日韩视频在线你懂得| 亚洲免费观看视频| 成人妖精视频yjsp地址| 91精品国产乱| 亚洲综合成人在线| 成人av电影观看| 久久亚洲精精品中文字幕早川悠里| 夜夜嗨av一区二区三区网页| 成人久久18免费网站麻豆| 精品欧美黑人一区二区三区| 五月婷婷色综合| 91免费视频网址| 国产精品区一区二区三区| 久久精品国产一区二区| 欧美日韩国产一级片| 中文字幕一区视频| 国产盗摄女厕一区二区三区| 日韩一级片网址| 午夜影院在线观看欧美| 色婷婷精品久久二区二区蜜臂av | 国产精品亚洲午夜一区二区三区| 欧美精品vⅰdeose4hd| 亚洲人成7777| 99视频精品在线| 欧美国产国产综合| 国产激情视频一区二区在线观看| 欧美大片日本大片免费观看| 婷婷久久综合九色国产成人| 日本伦理一区二区| 亚洲男人都懂的| 91影视在线播放| 亚洲免费观看高清完整版在线观看| 99久久亚洲一区二区三区青草| 国产欧美一区二区三区在线看蜜臀 | 日韩三级视频在线观看| 亚洲成av人影院在线观看网| 欧美色图第一页| 日韩精品色哟哟| 91精品国产色综合久久| 日韩精品久久理论片| 欧美一区二区三区不卡| 日韩不卡免费视频| 日韩一二三四区| 极品瑜伽女神91| 久久久亚洲精品一区二区三区| 国产一区亚洲一区| 国产欧美一区二区精品性色| 国产99久久久国产精品潘金网站| 国产欧美精品一区二区三区四区 | 亚洲黄网站在线观看| 99精品久久免费看蜜臀剧情介绍| 18成人在线观看| 欧美性受xxxx黑人xyx| 午夜免费久久看| 欧美一卡二卡在线观看| 久久99精品国产麻豆不卡| 久久久国产精品午夜一区ai换脸| 成人av电影免费在线播放| 亚洲蜜臀av乱码久久精品| 欧美区一区二区三区| 久久成人免费电影| 国产欧美精品区一区二区三区| 成人a区在线观看| 一区二区三区日韩精品| 欧美精品乱码久久久久久| 捆绑调教一区二区三区| 国产午夜精品久久久久久久 | 91成人在线精品| 天天亚洲美女在线视频| 26uuu精品一区二区三区四区在线| 成人永久看片免费视频天堂| 一区二区三区国产| 精品国产麻豆免费人成网站| 成人av免费在线播放| 亚洲高清三级视频| 久久综合av免费| 色偷偷成人一区二区三区91 | 欧美性色黄大片| 麻豆91在线观看| 亚洲色图另类专区| 日韩一二三四区| 91在线观看美女| 麻豆国产精品视频| 综合精品久久久| 日韩美女天天操| 91麻豆免费看片| 久久电影网站中文字幕| 国产精品不卡在线观看| 91精品国产综合久久精品图片| 风间由美一区二区三区在线观看| 亚洲国产精品久久久久婷婷884 | 亚洲免费观看高清完整版在线观看熊| 欧美高清视频不卡网| 国产91清纯白嫩初高中在线观看| 亚洲午夜久久久久| 国产日产亚洲精品系列| 欧美日韩国产综合一区二区| 岛国精品在线播放| 日韩成人av影视| 亚洲激情综合网| 国产日本欧洲亚洲| 欧美一区二区三区喷汁尤物| 91在线观看视频| 国产风韵犹存在线视精品| 天天综合色天天| 樱花草国产18久久久久| 久久九九全国免费| 日韩欧美资源站| 欧美日韩和欧美的一区二区| 99热99精品| 国产精品 日产精品 欧美精品| 青青草原综合久久大伊人精品| 亚洲免费观看高清完整| 亚洲国产经典视频| 精品三级在线看| 欧美精三区欧美精三区| 91麻豆免费在线观看| 东方欧美亚洲色图在线| 精品一区二区在线视频| 日本网站在线观看一区二区三区| 一区二区三区欧美激情| 国产精品久久综合| 久久精品夜色噜噜亚洲a∨| 日韩免费看的电影| 欧美高清视频www夜色资源网| 在线看日本不卡| 色婷婷一区二区| 91丨porny丨在线| 成人久久18免费网站麻豆 | 国产亚洲欧美一区在线观看| 欧美一级黄色大片| 91精品久久久久久久99蜜桃| 欧美日韩美少妇| 欧美色区777第一页| 欧美日韩一本到|