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

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

?? inthashtable.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? 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 com.lowagie.text.pdf;import java.util.Arrays;/// 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 {    /// 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 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 boolean contains( int value ) {        IntHashtableEntry tab[] = table;        for ( int i = tab.length ; i-- > 0 ; ) {            for ( IntHashtableEntry e = tab[i] ; e != null ; e = e.next ) {                if ( e.value == 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 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 int 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 0;    }        /// 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 int put( int key, int value ) {        // 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 ) {                int 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 0;    }        /// 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 int 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 0;    }        /// Clears the hash table so that it has no more elements in it.    public void clear() {        IntHashtableEntry tab[] = table;        for ( int index = tab.length; --index >= 0; )            tab[index] = null;        count = 0;    }        public int[] toOrderedKeys() {        int res[] = new int[count];        int ptr = 0;        int index = table.length;        IntHashtableEntry entry = null;        while (true) {            if (entry == null)                while ((index-- > 0) && ((entry = table[index]) == null));            if (entry == null)                break;            IntHashtableEntry e = entry;            entry = e.next;            res[ptr++] = e.key;        }        Arrays.sort(res);        return res;    }        class IntHashtableEntry {        int hash;        int key;        int value;        IntHashtableEntry next;    }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日本欧洲亚洲| 成人精品亚洲人成在线| av亚洲精华国产精华精华| 欧美性感一区二区三区| 国产亚洲女人久久久久毛片| 亚洲综合免费观看高清完整版在线| 久久精品国产免费看久久精品| 色老汉一区二区三区| 久久久精品2019中文字幕之3| 日韩精品国产精品| 欧美三级视频在线播放| 欧美激情在线免费观看| 国产一区二区三区免费看 | 欧美大度的电影原声| 国产精品久久久久精k8| 国产精品88888| 久久免费午夜影院| 韩国精品久久久| 日韩欧美久久久| 男女性色大片免费观看一区二区| 欧美三级电影精品| 亚洲精品亚洲人成人网在线播放| 成人一级片网址| 久久精品欧美一区二区三区不卡| 精品亚洲aⅴ乱码一区二区三区| 欧美肥妇bbw| 天堂影院一区二区| 在线电影院国产精品| 视频在线观看国产精品| 欧美一区二区三区四区在线观看| 亚洲成人一区二区| 欧美色偷偷大香| 午夜一区二区三区视频| 欧美日韩国产三级| 偷拍亚洲欧洲综合| 91精品在线一区二区| 日日噜噜夜夜狠狠视频欧美人| 欧美精品一卡两卡| 蜜桃在线一区二区三区| 欧美成人性战久久| 国产精品99久久久| 最新成人av在线| 色哟哟亚洲精品| 日韩中文字幕区一区有砖一区 | 99久久精品一区二区| 国产精品久久久久久久蜜臀| 99国产精品久久久久| 亚洲一区二区在线免费看| 制服丝袜中文字幕一区| 国产麻豆日韩欧美久久| 亚洲视频一区二区在线| 欧美三级中文字| 美女被吸乳得到大胸91| 国产欧美一区二区三区鸳鸯浴| aaa亚洲精品一二三区| 亚洲成人先锋电影| 久久久久久久网| 91国产精品成人| 麻豆国产欧美一区二区三区| 国产精品全国免费观看高清| 欧美在线免费视屏| 国产一区二区三区综合| 亚洲一区二区欧美| 久久嫩草精品久久久精品| 欧洲日韩一区二区三区| 国产乱码精品一品二品| 夜夜精品视频一区二区| 久久久五月婷婷| 欧美亚洲综合色| 国产成人亚洲精品青草天美| 亚洲成人www| 国产女人水真多18毛片18精品视频 | 国产精品网站在线观看| 欧美另类一区二区三区| 不卡的av在线| 国内精品久久久久影院色| 亚洲精品国产第一综合99久久 | 国产成人aaa| 奇米色777欧美一区二区| 综合在线观看色| 久久午夜电影网| 6080午夜不卡| 色偷偷一区二区三区| 国产一区二区三区高清播放| 国产精品888| 亚洲色图在线播放| 日韩精品中文字幕一区| 欧美午夜精品电影| 成人伦理片在线| 国产一区二区三区四区在线观看| 亚洲123区在线观看| 亚洲女性喷水在线观看一区| 久久美女艺术照精彩视频福利播放 | 青草国产精品久久久久久| 亚洲日本电影在线| 国产日本亚洲高清| 精品久久久久久久人人人人传媒| 欧美网站大全在线观看| 99精品在线观看视频| 成人高清视频在线观看| 国产成人精品影视| 国产精品1区2区3区在线观看| 免费观看91视频大全| 久久精品人人做人人爽97| 91精品福利在线一区二区三区 | 91精品国产黑色紧身裤美女| 欧美图区在线视频| 在线日韩av片| 在线亚洲高清视频| 欧美性色欧美a在线播放| 色天天综合久久久久综合片| 91精彩视频在线观看| 91视频在线观看免费| 色综合久久久久| 91国偷自产一区二区三区观看| 91黄色免费版| 欧美日韩国产综合视频在线观看 | 在线播放亚洲一区| 欧美日韩国产综合一区二区三区| 欧美日韩国产精品成人| 欧美精品国产精品| 欧美大片在线观看| 久久九九全国免费| 国产精品第一页第二页第三页| 中文字幕一区二区三区蜜月 | 日韩欧美色综合网站| 精品区一区二区| 中文字幕精品一区| 亚洲欧美经典视频| 五月婷婷综合在线| 激情久久五月天| 粉嫩嫩av羞羞动漫久久久| 色婷婷激情久久| 欧美日韩国产小视频| 精品国产髙清在线看国产毛片 | 久久久久久麻豆| 亚洲人成伊人成综合网小说| 亚洲曰韩产成在线| 老司机精品视频导航| 成人一区二区视频| 欧美日韩国产高清一区| 久久综合久久综合亚洲| 成人免费在线视频| 日韩不卡手机在线v区| 国产99久久久国产精品潘金网站| 一本色道久久综合精品竹菊| 欧美美女一区二区在线观看| 久久综合色之久久综合| 亚洲精品视频在线看| 麻豆精品久久精品色综合| 99riav一区二区三区| 日韩午夜在线播放| 国产精品毛片大码女人| 亚洲地区一二三色| 福利电影一区二区三区| 欧美日韩国产a| 国产精品嫩草影院av蜜臀| 首页国产丝袜综合| 99久久伊人久久99| 精品国产伦一区二区三区观看体验| 国产精品麻豆99久久久久久| 日韩高清电影一区| 91丨九色丨国产丨porny| 欧美不卡一二三| 亚洲一区二区av电影| 波波电影院一区二区三区| 日韩欧美高清一区| 亚洲国产sm捆绑调教视频| 成人av在线一区二区三区| 91精品国产一区二区三区蜜臀 | 中文字幕在线观看一区二区| 日本不卡不码高清免费观看| 在线亚洲高清视频| 国产精品福利一区二区三区| 国产一区二区精品在线观看| 91精品国产91久久久久久一区二区 | 91精品一区二区三区在线观看| 中文字幕一区在线| 国产99精品视频| 久久亚洲综合色| 久热成人在线视频| 欧美精品久久久久久久久老牛影院| 亚洲视频综合在线| av福利精品导航| 中文字幕在线观看一区| 国v精品久久久网| 久久婷婷成人综合色| 国内成+人亚洲+欧美+综合在线| 亚洲国产精品自拍| 亚洲一区二区精品久久av| 国产电影精品久久禁18| 日韩欧美你懂的| 麻豆91小视频| 日韩视频在线永久播放| 日韩高清一区在线| 日韩你懂的在线观看| 极品少妇xxxx偷拍精品少妇| 日韩精品中午字幕| 国产一区二区三区在线观看免费视频 | 欧美大片日本大片免费观看|