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

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

?? inthashtable.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
// IntHashtable - a Hashtable that uses ints as the keys//// This is 90% based on JavaSoft's java.util.Hashtable.//// Visit the ACME Labs Java page for up-to-date versions of this and// other// fine Java utilities: http://www.acme.com/java/package Acme;import java.util.Dictionary;import java.util.Enumeration;import java.util.NoSuchElementException;/// A Hashtable that uses ints as the keys.// <P>// Use just like java.util.Hashtable, except that the keys must be// ints.// This is much faster than creating a new Integer for each access.// <P>// <A HREF="/resources/classes/Acme/IntHashtable.java">Fetch the// software.</A><BR>// <A HREF="/resources/classes/Acme.tar.gz">Fetch the entire Acme// package.</A>// <P>// @see java.util.Hashtablepublic class IntHashtable extends Dictionary implements Cloneable {    /// The hash table data.    private IntHashtableEntry table[];    /// The total number of entries in the hash table.    private int count;    /// Rehashes the table when count exceeds this threshold.    private int threshold;    /// The load factor for the hashtable.    private float loadFactor;    /// Constructs a new, empty hashtable with the specified initial    // capacity and the specified load factor.    // @param initialCapacity the initial number of buckets    // @param loadFactor a number between 0.0 and 1.0, it defines    //          the threshold for rehashing the hashtable into    //          a bigger one.    // @exception IllegalArgumentException If the initial capacity    // is less than or equal to zero.    // @exception IllegalArgumentException If the load factor is    // less than or equal to zero.    public IntHashtable(int initialCapacity, float loadFactor) {        if (initialCapacity <= 0 || loadFactor <= 0.0)            throw new IllegalArgumentException();        this.loadFactor = loadFactor;        table = new IntHashtableEntry[initialCapacity];        threshold = (int) (initialCapacity * loadFactor);    }    /// Constructs a new, empty hashtable with the specified initial    // capacity.    // @param initialCapacity the initial number of buckets    public IntHashtable(int initialCapacity) {        this(initialCapacity, 0.75f);    }    /// Constructs a new, empty hashtable. A default capacity and    // load factor    // is used. Note that the hashtable will automatically grow when    // it gets    // full.    public IntHashtable() {        this(101, 0.75f);    }    /// Returns the number of elements contained in the hashtable.    public int size() {        return count;    }    /// Returns true if the hashtable contains no elements.    public boolean isEmpty() {        return count == 0;    }    /// Returns an enumeration of the hashtable's keys.    // @see IntHashtable#elements    public synchronized Enumeration keys() {        return new IntHashtableEnumerator(table, true);    }    /// Returns an enumeration of the elements. Use the Enumeration    // methods    // on the returned object to fetch the elements sequentially.    // @see IntHashtable#keys    public synchronized Enumeration elements() {        return new IntHashtableEnumerator(table, false);    }    /// Returns true if the specified object is an element of the    // hashtable.    // This operation is more expensive than the containsKey() method.    // @param value the value that we are looking for    // @exception NullPointerException If the value being searched    // for is equal to null.    // @see IntHashtable#containsKey    public synchronized boolean contains(Object value) {        if (value == null)            throw new NullPointerException();        IntHashtableEntry tab[] = table;        for (int i = tab.length; i-- > 0;) {            for (IntHashtableEntry e = tab[i]; e != null; e = e.next) {                if (e.value.equals(value))                    return true;            }        }        return false;    }    /// Returns true if the collection contains an element for the    // key.    // @param key the key that we are looking for    // @see IntHashtable#contains    public synchronized boolean containsKey(int key) {        IntHashtableEntry tab[] = table;        int hash = key;        int index = (hash & 0x7FFFFFFF) % tab.length;        for (IntHashtableEntry e = tab[index]; e != null; e = e.next) {            if (e.hash == hash && e.key == key)                return true;        }        return false;    }    /// Gets the object associated with the specified key in the    // hashtable.    // @param key the specified key    // @returns the element for the key or null if the key    //          is not defined in the hash table.    // @see IntHashtable#put    public synchronized Object get(int key) {        IntHashtableEntry tab[] = table;        int hash = key;        int index = (hash & 0x7FFFFFFF) % tab.length;        for (IntHashtableEntry e = tab[index]; e != null; e = e.next) {            if (e.hash == hash && e.key == key)                return e.value;        }        return null;    }    /// A get method that takes an Object, for compatibility with    // java.util.Dictionary. The Object must be an Integer.    public Object get(Object okey) {        if (!(okey instanceof Integer))            throw new InternalError("key is not an Integer");        Integer ikey = (Integer) okey;        int key = ikey.intValue();        return get(key);    }    /// Rehashes the content of the table into a bigger table.    // This method is called automatically when the hashtable's    // size exceeds the threshold.    protected void rehash() {        int oldCapacity = table.length;        IntHashtableEntry oldTable[] = table;        int newCapacity = oldCapacity * 2 + 1;        IntHashtableEntry newTable[] = new IntHashtableEntry[newCapacity];        threshold = (int) (newCapacity * loadFactor);        table = newTable;        for (int i = oldCapacity; i-- > 0;) {            for (IntHashtableEntry old = oldTable[i]; old != null;) {                IntHashtableEntry e = old;                old = old.next;                int index = (e.hash & 0x7FFFFFFF) % newCapacity;                e.next = newTable[index];                newTable[index] = e;            }        }    }    /// Puts the specified element into the hashtable, using the    // specified    // key. The element may be retrieved by doing a get() with the    // same key.    // The key and the element cannot be null.    // @param key the specified key in the hashtable    // @param value the specified element    // @exception NullPointerException If the value of the element    // is equal to null.    // @see IntHashtable#get    // @return the old value of the key, or null if it did not have    // one.    public synchronized Object put(int key, Object value) {        // Make sure the value is not null.        if (value == null)            throw new NullPointerException();        // Makes sure the key is not already in the hashtable.        IntHashtableEntry tab[] = table;        int hash = key;        int index = (hash & 0x7FFFFFFF) % tab.length;        for (IntHashtableEntry e = tab[index]; e != null; e = e.next) {            if (e.hash == hash && e.key == key) {                Object old = e.value;                e.value = value;                return old;            }        }        if (count >= threshold) {            // Rehash the table if the threshold is exceeded.            rehash();            return put(key, value);        }        // Creates the new entry.        IntHashtableEntry e = new IntHashtableEntry();        e.hash = hash;        e.key = key;        e.value = value;        e.next = tab[index];        tab[index] = e;        ++count;        return null;    }    /// A put method that takes an Object, for compatibility with    // java.util.Dictionary. The Object must be an Integer.    public Object put(Object okey, Object value) {        if (!(okey instanceof Integer))            throw new InternalError("key is not an Integer");        Integer ikey = (Integer) okey;        int key = ikey.intValue();        return put(key, value);    }    /// Removes the element corresponding to the key. Does nothing if    // the    // key is not present.    // @param key the key that needs to be removed    // @return the value of key, or null if the key was not found.    public synchronized Object remove(int key) {        IntHashtableEntry tab[] = table;        int hash = key;        int index = (hash & 0x7FFFFFFF) % tab.length;        for (IntHashtableEntry e = tab[index], prev = null; e != null; prev = e, e = e.next) {            if (e.hash == hash && e.key == key) {                if (prev != null)                    prev.next = e.next;                else                    tab[index] = e.next;                --count;                return e.value;            }        }        return null;    }    /// A remove method that takes an Object, for compatibility with    // java.util.Dictionary. The Object must be an Integer.    public Object remove(Object okey) {        if (!(okey instanceof Integer))            throw new InternalError("key is not an Integer");        Integer ikey = (Integer) okey;        int key = ikey.intValue();        return remove(key);    }    /// Clears the hash table so that it has no more elements in it.    public synchronized void clear() {        IntHashtableEntry tab[] = table;        for (int index = tab.length; --index >= 0;)            tab[index] = null;        count = 0;    }    /// Creates a clone of the hashtable. A shallow copy is made,    // the keys and elements themselves are NOT cloned. This is a    // relatively expensive operation.    public synchronized Object clone() {        try {            IntHashtable t = (IntHashtable) super.clone();            t.table = new IntHashtableEntry[table.length];            for (int i = table.length; i-- > 0;)                t.table[i] = (table[i] != null) ? (IntHashtableEntry) table[i].clone()                        : null;            return t;        } catch (CloneNotSupportedException e) {            // This shouldn't happen, since we are Cloneable.            throw new InternalError();        }    }    /// Converts to a rather lengthy String.    public synchronized String toString() {        int max = size() - 1;        StringBuffer buf = new StringBuffer();        Enumeration k = keys();        Enumeration e = elements();        buf.append("{");        for (int i = 0; i <= max; ++i) {            String s1 = k.nextElement().toString();            String s2 = e.nextElement().toString();            buf.append(s1 + "=" + s2);            if (i < max)                buf.append(", ");        }        buf.append("}");        return buf.toString();    }}class IntHashtableEntry {    int hash;    int key;    Object value;    IntHashtableEntry next;    protected Object clone() {        IntHashtableEntry entry = new IntHashtableEntry();        entry.hash = hash;        entry.key = key;        entry.value = value;        entry.next = (next != null) ? (IntHashtableEntry) next.clone() : null;        return entry;    }}class IntHashtableEnumerator implements Enumeration {    boolean keys;    int index;    IntHashtableEntry table[];    IntHashtableEntry entry;    IntHashtableEnumerator(IntHashtableEntry table[], boolean keys) {        this.table = table;        this.keys = keys;        this.index = table.length;    }    public boolean hasMoreElements() {        if (entry != null)            return true;        while (index-- > 0)            if ((entry = table[index]) != null)                return true;        return false;    }    public Object nextElement() {        if (entry == null)            while ((index-- > 0) && ((entry = table[index]) == null))                ;        if (entry != null) {            IntHashtableEntry e = entry;            entry = e.next;            return keys ? new Integer(e.key) : e.value;        }        throw new NoSuchElementException("IntHashtableEnumerator");    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人激情动漫在线观看| 奇米精品一区二区三区在线观看 | 亚洲黄色尤物视频| 久久先锋影音av| 91精品国产一区二区人妖| 日本高清成人免费播放| 国产99久久久国产精品免费看| 日韩国产一二三区| 亚洲午夜精品久久久久久久久| 国产精品毛片大码女人 | 色中色一区二区| 春色校园综合激情亚洲| 国产精品一卡二卡在线观看| 成人国产精品免费网站| 久久精品国产精品亚洲红杏| 日本一区中文字幕| 午夜精品福利视频网站| 日韩在线卡一卡二| 精品欧美久久久| 日韩精品一区二区三区四区视频| 欧美日韩亚洲不卡| 欧美羞羞免费网站| 欧美日韩成人综合| 欧美日韩一区二区三区四区五区| 成a人片亚洲日本久久| 国产91丝袜在线观看| 成人一级视频在线观看| 国产+成+人+亚洲欧洲自线| 高清在线观看日韩| 99这里都是精品| 欧美亚洲国产bt| 69堂成人精品免费视频| 日韩欧美一级在线播放| 精品国产乱码久久久久久夜甘婷婷| 日韩一区二区精品| 国产婷婷色一区二区三区在线| 中文在线一区二区| 亚洲一区在线观看免费观看电影高清| 午夜视黄欧洲亚洲| 国产大陆精品国产| 欧美三级乱人伦电影| 精品欧美一区二区久久| 国产精品久久久久永久免费观看 | 国产一区二区三区免费观看| 免费精品99久久国产综合精品| 麻豆精品一区二区| 国产成人免费高清| 国产一区二区三区视频在线播放| 成人av午夜电影| 国产毛片精品视频| 国产精品18久久久久久vr| 东方欧美亚洲色图在线| 在线观看亚洲一区| 精品福利在线导航| 亚洲欧美中日韩| 亚洲午夜一区二区| 看电视剧不卡顿的网站| 国内不卡的二区三区中文字幕| 国产成人av电影在线| 91色.com| 欧美成人福利视频| 亚洲人成在线播放网站岛国| 亚洲超碰精品一区二区| 国产成人综合在线| 在线观看日韩精品| 久久综合九色综合97_久久久| 国产精品白丝在线| 久久精品久久99精品久久| 在线中文字幕一区二区| 国产日韩精品视频一区| 亚洲欧美日韩中文字幕一区二区三区 | 免费一级片91| av在线播放一区二区三区| 91精品国产综合久久久久久| 日韩精品一区二| 亚洲综合一区二区| 国产原创一区二区三区| 欧美日韩国产综合视频在线观看 | 国产高清一区日本| 欧美美女直播网站| 日本一区二区三区四区| 欧美aaaaaa午夜精品| 欧美日韩一区久久| 一区二区三区在线不卡| 99久久精品费精品国产一区二区| 久久精品欧美日韩| 国产精品小仙女| 国产日本亚洲高清| 国产精品一二三在| 久久久精品黄色| 久久99九九99精品| 日韩欧美卡一卡二| 奇米精品一区二区三区在线观看一| 在线观看av一区| 亚洲国产色一区| 欧美日韩免费在线视频| 国产亚洲人成网站| 久久er99热精品一区二区| 在线观看免费成人| 亚洲午夜一二三区视频| 在线日韩一区二区| 日韩伦理av电影| 国产精品白丝jk白祙喷水网站 | 色欧美片视频在线观看在线视频| 中文字幕精品一区 | 亚洲成a天堂v人片| 欧美吞精做爰啪啪高潮| 夜夜亚洲天天久久| 成人h精品动漫一区二区三区| 欧美一区二区在线视频| 丝袜诱惑亚洲看片| 欧美肥妇毛茸茸| 一区二区久久久| 91麻豆国产在线观看| 中文字幕一区日韩精品欧美| 懂色av噜噜一区二区三区av| 国产精品人成在线观看免费 | 国产一区二区在线观看视频| 久久久久久久综合日本| 99精品黄色片免费大全| 亚洲国产综合91精品麻豆| 91精品国产91久久久久久最新毛片| 一区二区三区日韩在线观看| 一本久道久久综合中文字幕| 久久久国产精品麻豆| 成人高清视频在线观看| 亚洲人成人一区二区在线观看| 在线免费不卡电影| 精品亚洲免费视频| 综合激情成人伊人| 欧美电影免费观看高清完整版在线观看 | 国产精品欧美久久久久无广告| 不卡高清视频专区| 亚洲精品国产无天堂网2021| 日韩欧美激情一区| av电影在线观看不卡| 日韩黄色片在线观看| 中文在线资源观看网站视频免费不卡| 日本韩国欧美在线| 国产一区二三区| 亚洲一区二区在线免费看| 欧美成人三级电影在线| 91国偷自产一区二区三区观看| 久久国产精品99精品国产 | 欧美极品少妇xxxxⅹ高跟鞋| 欧美在线免费播放| 国产精品1区2区3区| 日韩av中文字幕一区二区 | 欧美亚洲综合在线| 成人国产精品免费网站| 国产在线观看一区二区| 视频在线在亚洲| 亚洲精品国产视频| 国产精品美女一区二区在线观看| 日韩一级大片在线观看| 欧美亚洲国产怡红院影院| a级精品国产片在线观看| 久久精品久久精品| 丝袜亚洲另类欧美| 亚洲精品国久久99热| 中文字幕一区视频| 国产精品狼人久久影院观看方式| 欧美变态口味重另类| 日韩丝袜美女视频| 91精品国产福利| 51久久夜色精品国产麻豆| 欧美色视频在线观看| 91性感美女视频| 成人免费视频免费观看| 国产福利一区二区| 国产 日韩 欧美大片| 国产乱码精品一区二区三区av| 日本aⅴ亚洲精品中文乱码| 日韩综合小视频| 日韩制服丝袜av| 丝袜亚洲另类丝袜在线| 午夜亚洲福利老司机| 亚洲最色的网站| 亚洲综合丝袜美腿| 亚洲sss视频在线视频| 国产裸体歌舞团一区二区| 91精品国产乱| 偷窥少妇高潮呻吟av久久免费| 亚洲精品国产品国语在线app| 亚洲精品视频免费观看| 国产一区二区视频在线播放| 在线电影院国产精品| 亚洲第一成人在线| 久久精品国产99国产精品| 制服丝袜在线91| 亚洲成av人影院| 精品中文字幕一区二区小辣椒| 欧美精品在线一区二区三区| 一区二区三区在线不卡| 免费观看91视频大全| 国产成人综合精品三级| 久久伊人中文字幕| 国产激情一区二区三区| 久久亚洲精华国产精华液| 亚洲一区二区视频|