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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? treemap.java

?? 俄羅斯高人Mamaich的Pocket gcc編譯器(運行在PocketPC上)的全部源代碼。
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
  /**   * Returns a view of this Map including all entries with keys less than   * <code>toKey</code>. The returned map is backed by the original, so changes   * in one appear in the other. The submap will throw an   * {@link IllegalArgumentException} for any attempt to access or add an   * element beyond the specified cutoff. The returned map does not include   * the endpoint; if you want inclusion, pass the successor element.   *   * @param toKey the (exclusive) cutoff point   * @return a view of the map less than the cutoff   * @throws ClassCastException if <code>toKey</code> is not compatible with   *         the comparator (or is not Comparable, for natural ordering)   * @throws NullPointerException if toKey is null, but the comparator does not   *         tolerate null elements   */  public SortedMap headMap(Object toKey)  {    return new SubMap(nil, toKey);  }  /**   * Returns a "set view" of this TreeMap's keys. The set is backed by the   * TreeMap, so changes in one show up in the other.  The set supports   * element removal, but not element addition.   *   * @return a set view of the keys   * @see #values()   * @see #entrySet()   */  public Set keySet()  {    if (keys == null)      // Create an AbstractSet with custom implementations of those methods      // that can be overriden easily and efficiently.      keys = new AbstractSet()      {        public int size()        {          return size;        }        public Iterator iterator()        {          return new TreeIterator(KEYS);        }        public void clear()        {          TreeMap.this.clear();        }        public boolean contains(Object o)        {          return containsKey(o);        }        public boolean remove(Object key)        {          Node n = getNode(key);          if (n == nil)            return false;          removeNode(n);          return true;        }      };    return keys;  }  /**   * Returns the last (highest) key in the map.   *   * @return the last key   * @throws NoSuchElementException if the map is empty   */  public Object lastKey()  {    if (root == nil)      throw new NoSuchElementException("empty");    return lastNode().key;  }  /**   * Puts the supplied value into the Map, mapped by the supplied key.   * The value may be retrieved by any object which <code>equals()</code>   * this key. NOTE: Since the prior value could also be null, you must   * first use containsKey if you want to see if you are replacing the   * key's mapping.   *   * @param key the key used to locate the value   * @param value the value to be stored in the HashMap   * @return the prior mapping of the key, or null if there was none   * @throws ClassCastException if key is not comparable to current map keys   * @throws NullPointerException if key is null, but the comparator does   *         not tolerate nulls   * @see #get(Object)   * @see Object#equals(Object)   */  public Object put(Object key, Object value)  {    Node current = root;    Node parent = nil;    int comparison = 0;    // Find new node's parent.    while (current != nil)      {        parent = current;        comparison = compare(key, current.key);        if (comparison > 0)          current = current.right;        else if (comparison < 0)          current = current.left;        else // Key already in tree.          return current.setValue(value);      }    // Set up new node.    Node n = new Node(key, value, RED);    n.parent = parent;    // Insert node in tree.    modCount++;    size++;    if (parent == nil)      {        // Special case inserting into an empty tree.        root = n;        return null;      }    if (comparison > 0)      parent.right = n;    else      parent.left = n;    // Rebalance after insert.    insertFixup(n);    return null;  }  /**   * Copies all elements of the given map into this hashtable.  If this table   * already has a mapping for a key, the new mapping replaces the current   * one.   *   * @param m the map to be hashed into this   * @throws ClassCastException if a key in m is not comparable with keys   *         in the map   * @throws NullPointerException if a key in m is null, and the comparator   *         does not tolerate nulls   */  public void putAll(Map m)  {    Iterator itr = m.entrySet().iterator();    int pos = m.size();    while (--pos >= 0)      {        Map.Entry e = (Map.Entry) itr.next();        put(e.getKey(), e.getValue());      }  }  /**   * Removes from the TreeMap and returns the value which is mapped by the   * supplied key. If the key maps to nothing, then the TreeMap remains   * unchanged, and <code>null</code> is returned. NOTE: Since the value   * could also be null, you must use containsKey to see if you are   * actually removing a mapping.   *   * @param key the key used to locate the value to remove   * @return whatever the key mapped to, if present   * @throws ClassCastException if key is not comparable to current map keys   * @throws NullPointerException if key is null, but the comparator does   *         not tolerate nulls   */  public Object remove(Object key)  {    Node n = getNode(key);    if (n == nil)      return null;    // Note: removeNode can alter the contents of n, so save value now.    Object result = n.value;    removeNode(n);    return result;  }  /**   * Returns the number of key-value mappings currently in this Map.   *   * @return the size   */  public int size()  {    return size;  }  /**   * Returns a view of this Map including all entries with keys greater or   * equal to <code>fromKey</code> and less than <code>toKey</code> (a   * half-open interval). The returned map is backed by the original, so   * changes in one appear in the other. The submap will throw an   * {@link IllegalArgumentException} for any attempt to access or add an   * element beyond the specified cutoffs. The returned map includes the low   * endpoint but not the high; if you want to reverse this behavior on   * either end, pass in the successor element.   *   * @param fromKey the (inclusive) low cutoff point   * @param toKey the (exclusive) high cutoff point   * @return a view of the map between the cutoffs   * @throws ClassCastException if either cutoff is not compatible with   *         the comparator (or is not Comparable, for natural ordering)   * @throws NullPointerException if fromKey or toKey is null, but the   *         comparator does not tolerate null elements   * @throws IllegalArgumentException if fromKey is greater than toKey   */  public SortedMap subMap(Object fromKey, Object toKey)  {    return new SubMap(fromKey, toKey);  }  /**   * Returns a view of this Map including all entries with keys greater or   * equal to <code>fromKey</code>. The returned map is backed by the   * original, so changes in one appear in the other. The submap will throw an   * {@link IllegalArgumentException} for any attempt to access or add an   * element beyond the specified cutoff. The returned map includes the   * endpoint; if you want to exclude it, pass in the successor element.   *   * @param fromKey the (inclusive) low cutoff point   * @return a view of the map above the cutoff   * @throws ClassCastException if <code>fromKey</code> is not compatible with   *         the comparator (or is not Comparable, for natural ordering)   * @throws NullPointerException if fromKey is null, but the comparator   *         does not tolerate null elements   */  public SortedMap tailMap(Object fromKey)  {    return new SubMap(fromKey, nil);  }  /**   * Returns a "collection view" (or "bag view") of this TreeMap's values.   * The collection is backed by the TreeMap, so changes in one show up   * in the other.  The collection supports element removal, but not element   * addition.   *   * @return a bag view of the values   * @see #keySet()   * @see #entrySet()   */  public Collection values()  {    if (values == null)      // We don't bother overriding many of the optional methods, as doing so      // wouldn't provide any significant performance advantage.      values = new AbstractCollection()      {        public int size()        {          return size;        }        public Iterator iterator()        {          return new TreeIterator(VALUES);        }        public void clear()        {          TreeMap.this.clear();        }      };    return values;  }  /**   * Compares two elements by the set comparator, or by natural ordering.   * Package visible for use by nested classes.   *   * @param o1 the first object   * @param o2 the second object   * @throws ClassCastException if o1 and o2 are not mutually comparable,   *         or are not Comparable with natural ordering   * @throws NullPointerException if o1 or o2 is null with natural ordering   */  final int compare(Object o1, Object o2)  {    return (comparator == null            ? ((Comparable) o1).compareTo(o2)            : comparator.compare(o1, o2));  }  /**   * Maintain red-black balance after deleting a node.   *   * @param node the child of the node just deleted, possibly nil   * @param parent the parent of the node just deleted, never nil   */  private void deleteFixup(Node node, Node parent)  {    // if (parent == nil)    //   throw new InternalError();    // If a black node has been removed, we need to rebalance to avoid    // violating the "same number of black nodes on any path" rule. If    // node is red, we can simply recolor it black and all is well.    while (node != root && node.color == BLACK)      {        if (node == parent.left)          {            // Rebalance left side.            Node sibling = parent.right;            // if (sibling == nil)            //   throw new InternalError();            if (sibling.color == RED)              {                // Case 1: Sibling is red.                // Recolor sibling and parent, and rotate parent left.                sibling.color = BLACK;                parent.color = RED;                rotateLeft(parent);                sibling = parent.right;              }            if (sibling.left.color == BLACK && sibling.right.color == BLACK)              {                // Case 2: Sibling has no red children.                // Recolor sibling, and move to parent.                sibling.color = RED;                node = parent;                parent = parent.parent;              }            else              {                if (sibling.right.color == BLACK)                  {                    // Case 3: Sibling has red left child.                    // Recolor sibling and left child, rotate sibling right.                    sibling.left.color = BLACK;                    sibling.color = RED;                    rotateRight(sibling);                    sibling = parent.right;                  }                // Case 4: Sibling has red right child. Recolor sibling,                // right child, and parent, and rotate parent left.                sibling.color = parent.color;                parent.color = BLACK;                sibling.right.color = BLACK;                rotateLeft(parent);                node = root; // Finished.              }          }        else          {            // Symmetric "mirror" of left-side case.            Node sibling = parent.left;            // if (sibling == nil)            //   throw new InternalError();            if (sibling.color == RED)              {                // Case 1: Sibling is red.                // Recolor sibling and parent, and rotate parent right.                sibling.color = BLACK;                parent.color = RED;                rotateRight(parent);                sibling = parent.left;              }            if (sibling.right.color == BLACK && sibling.left.color == BLACK)              {                // Case 2: Sibling has no red children.                // Recolor sibling, and move to parent.                sibling.color = RED;                node = parent;                parent = parent.parent;              }            else              {                if (sibling.left.color == BLACK)                  {                    // Case 3: Sibling has red right child.                    // Recolor sibling and right child, rotate sibling left.                    sibling.right.color = BLACK;                    sibling.color = RED;                    rotateLeft(sibling);                    sibling = parent.left;                  }                // Case 4: Sibling has red left child. Recolor sibling,                // left child, and parent, and rotate parent right.                sibling.color = parent.color;                parent.color = BLACK;                sibling.left.color = BLACK;                rotateRight(parent);                node = root; // Finished.              }          }      }    node.color = BLACK;  }  /**   * Construct a perfectly balanced tree consisting of n "blank" nodes. This   * permits a tree to be generated from pre-sorted input in linear time.   *   * @param count the number of blank nodes, non-negative   */  private void fabricateTree(final int count)  {    if (count == 0)      return;    // We color every row of nodes black, except for the overflow nodes.    // I believe that this is the optimal arrangement. We construct the tree    // in place by temporarily linking each node to the next node in the row,    // then updating those links to the children when working on the next row.    // Make the root node.    root = new Node(null, null, BLACK);    size = count;    Node row = root;    int rowsize;    // Fill each row that is completely full of nodes.    for (rowsize = 2; rowsize + rowsize <= count; rowsize <<= 1)      {        Node parent = row;        Node last = null;        for (int i = 0; i < rowsize; i += 2)          {            Node left = new Node(null, null, BLACK);            Node right = new Node(null, null, BLACK);            left.parent = parent;            left.right = right;            right.parent = parent;            parent.left = left;            Node next = parent.right;            parent.right = right;            parent = next;            if (last != null)              last.right = left;            last = right;          }        row = row.left;      }    // Now do the partial final row in red.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合咪咪久久| 视频一区二区三区入口| 粉嫩aⅴ一区二区三区四区五区| 日韩一级完整毛片| 蜜臀久久99精品久久久久宅男| 欧美高清性hdvideosex| 午夜日韩在线电影| 欧美成人一区二区三区| 国内外精品视频| 国产精品日韩成人| 色婷婷综合久色| 丝袜亚洲精品中文字幕一区| 日韩女优av电影| 国产精品综合网| 亚洲福利视频一区| 3751色影院一区二区三区| 日韩二区三区在线观看| 精品剧情v国产在线观看在线| 精品在线播放免费| 欧美激情中文不卡| 在线看一区二区| 三级一区在线视频先锋| 精品国产露脸精彩对白| caoporen国产精品视频| 亚洲线精品一区二区三区八戒| 欧美一级高清片| 高清视频一区二区| 亚洲一区二区综合| 欧美精品一区二区三区一线天视频| 国产精品77777| 亚洲国产精品一区二区www| 日韩你懂的在线观看| 99久久精品国产导航| 日本欧美在线观看| 国产欧美日韩在线看| 欧美系列在线观看| 国产一区二区导航在线播放| 亚洲欧美日韩综合aⅴ视频| 欧美一区二区高清| 91免费版pro下载短视频| 老司机午夜精品99久久| 亚洲少妇30p| 亚洲精品在线观看网站| 色婷婷精品久久二区二区蜜臀av| 老司机午夜精品| 亚洲女同ⅹxx女同tv| 久久只精品国产| 欧美日韩视频在线第一区| 国产成人夜色高潮福利影视| 午夜伦欧美伦电影理论片| 欧美国产日韩在线观看| 91麻豆精品国产91| 色婷婷av一区二区三区大白胸| 韩国一区二区在线观看| 婷婷夜色潮精品综合在线| 亚洲欧洲三级电影| 久久你懂得1024| 欧美一区二区三区在线看| 91麻豆6部合集magnet| 国产成人av在线影院| 欧美aⅴ一区二区三区视频| 亚洲男人的天堂在线aⅴ视频| 久久久国产一区二区三区四区小说 | 精品剧情在线观看| 欧美日韩精品一区二区三区蜜桃| 成人蜜臀av电影| 国产精品一线二线三线精华| 日韩中文字幕1| 亚洲第一会所有码转帖| 亚洲老司机在线| 日韩理论片网站| 亚洲国产精品t66y| 国产欧美日韩精品一区| www久久精品| 精品国产91乱码一区二区三区| 欧美高清性hdvideosex| 欧美日韩国产一级二级| 欧美日韩中文字幕一区| 91极品美女在线| 91国产精品成人| 色偷偷久久人人79超碰人人澡| 91美女视频网站| 91美女视频网站| 色噜噜狠狠成人中文综合 | 久久久久97国产精华液好用吗| 欧美一级日韩不卡播放免费| 51精品国自产在线| 91精品欧美一区二区三区综合在 | 欧美日韩一区二区欧美激情| 欧美性一区二区| 91超碰这里只有精品国产| 欧美夫妻性生活| 欧美成人性福生活免费看| 精品女同一区二区| 国产亚洲欧美一区在线观看| 国产欧美一区二区三区在线看蜜臀 | 日韩一区二区免费高清| 日韩欧美高清一区| 久久久久久一级片| 国产精品卡一卡二| 亚洲愉拍自拍另类高清精品| 亚洲成av人在线观看| 裸体歌舞表演一区二区| 国产999精品久久| 99re免费视频精品全部| 欧美日韩国产一区| 亚洲精品在线免费播放| 国产精品美女久久久久aⅴ| 亚洲精品视频观看| 日韩不卡一二三区| 国产精品亚洲综合一区在线观看| 99视频有精品| 欧美一级片在线| 欧美国产禁国产网站cc| 一区二区三区在线视频观看58| 日韩精品免费视频人成| 国产成人亚洲综合色影视| 在线免费精品视频| 精品久久久久久久久久久久久久久久久| 久久影院视频免费| 亚洲色图在线播放| 乱一区二区av| 99re这里都是精品| 日韩精品一区二区三区视频 | 欧美一区二区三区在线看| 久久精品亚洲一区二区三区浴池| 亚洲美女视频一区| 韩国视频一区二区| 欧美视频一区在线| 久久久激情视频| 香蕉久久夜色精品国产使用方法 | 久久国产福利国产秒拍| 99久久久久久| 日韩一卡二卡三卡国产欧美| 欧美激情艳妇裸体舞| 午夜精品福利一区二区蜜股av | 久久精品99国产精品| 91无套直看片红桃| 久久无码av三级| 三级欧美在线一区| av一二三不卡影片| 久久女同互慰一区二区三区| 亚洲国产综合人成综合网站| 成人av电影在线| 精品黑人一区二区三区久久| 一区二区在线观看av| 成人性生交大片免费看中文网站| 欧美一区午夜精品| 亚洲成人中文在线| 91视频在线观看免费| 久久精品亚洲精品国产欧美kt∨| 日韩国产在线观看一区| 91美女精品福利| 国产精品乱人伦中文| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲高清免费观看高清完整版在线观看| 大美女一区二区三区| 精品国产凹凸成av人网站| 丝袜亚洲另类丝袜在线| 欧美性受极品xxxx喷水| 亚洲男人的天堂网| 91在线国产观看| 中文字幕在线不卡视频| 成人三级在线视频| 国产人伦精品一区二区| 国产一区二区三区久久悠悠色av| 日韩午夜激情视频| 蜜臀精品久久久久久蜜臀| 欧美久久久久久久久久| 亚洲国产aⅴ成人精品无吗| 在线观看成人免费视频| 一区二区三区小说| 欧美性三三影院| 性欧美疯狂xxxxbbbb| 欧美疯狂做受xxxx富婆| 日本伊人午夜精品| 欧美videos中文字幕| 激情偷乱视频一区二区三区| 精品国内片67194| 国产一区不卡视频| 久久精品人人做人人爽97| 成人视屏免费看| 亚洲免费看黄网站| 欧美午夜在线观看| 免费成人小视频| 久久综合九色综合97婷婷| 国产盗摄女厕一区二区三区| 国产欧美日韩在线观看| 99re8在线精品视频免费播放| 一区二区三区中文免费| 欧美日韩视频专区在线播放| 免费成人深夜小野草| 久久影院视频免费| 波多野结衣在线一区| 亚洲一区二区三区四区在线免费观看| 欧美在线观看一区| 男人操女人的视频在线观看欧美| 久久尤物电影视频在线观看| 成a人片国产精品| 亚洲国产精品麻豆|