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

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

?? treemap.java

?? gcc-you can use this code to learn something about gcc, and inquire further into linux,
?? 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一区二区三区免费野_久草精品视频
欧美图区在线视频| 91麻豆精品国产自产在线| 亚洲在线视频免费观看| 欧美videos大乳护士334| 99视频有精品| 精品一区二区三区日韩| 亚洲v中文字幕| 亚洲视频狠狠干| 久久老女人爱爱| 日韩免费观看2025年上映的电影| 欧美色国产精品| 91麻豆精品秘密| 国产精品77777| 久久99精品久久久久| 日韩精品一卡二卡三卡四卡无卡| 中文字幕一区二区视频| 国产日韩视频一区二区三区| 欧美一区二区三区在线观看| 欧美日韩一二三区| 色婷婷久久一区二区三区麻豆| 国产高清不卡二三区| 久久精品国产亚洲高清剧情介绍| 亚洲福利视频导航| 一区二区三区精品视频在线| 中文字幕在线观看一区二区| 欧美激情一区二区在线| 久久精品一区二区三区av| 日韩欧美aaaaaa| 3d动漫精品啪啪1区2区免费| 欧美日韩国产精选| 欧美三级日韩在线| 在线看日本不卡| 91精品办公室少妇高潮对白| 91欧美一区二区| 91免费版在线| 91成人看片片| 欧美性极品少妇| 欧美性极品少妇| 欧美精品xxxxbbbb| 911精品国产一区二区在线| 欧美日韩国产欧美日美国产精品| 欧美日本国产一区| 91精品国产一区二区三区蜜臀| 欧美一区日本一区韩国一区| 日韩一区二区三区视频| 欧美大白屁股肥臀xxxxxx| 91精品国产欧美一区二区18| 日韩一级黄色片| 2021中文字幕一区亚洲| 中文一区一区三区高中清不卡| 国产精品乱人伦| 伊人夜夜躁av伊人久久| 手机精品视频在线观看| 久久精品国产99| 丁香婷婷综合激情五月色| 91在线视频免费观看| 欧美艳星brazzers| 在线综合亚洲欧美在线视频| 精品日韩欧美在线| 国产精品色眯眯| 一区二区成人在线| 男人的天堂亚洲一区| 国产麻豆精品视频| 99精品国产视频| 欧美高清www午色夜在线视频| 欧美大片在线观看一区| 日本一二三不卡| 一区二区三区.www| 精品一区二区三区在线播放视频 | 精品入口麻豆88视频| 国产欧美一区二区三区鸳鸯浴 | 国产丝袜欧美中文另类| 亚洲人成伊人成综合网小说| 亚洲一区二区欧美| 国产一区二区三区黄视频| 色综合久久久久综合体| 日韩三级高清在线| 国产精品麻豆视频| 粉嫩绯色av一区二区在线观看| 91久久人澡人人添人人爽欧美 | 亚洲精品国产无套在线观| 日本不卡视频一二三区| 成人性生交大片免费看视频在线| 精品视频在线免费| 国产欧美一区二区三区鸳鸯浴 | 婷婷成人综合网| 国产成a人亚洲精品| 欧美日韩黄视频| 国产日韩欧美精品电影三级在线| 亚洲二区视频在线| 成人手机在线视频| 日韩精品中文字幕一区 | 亚洲免费电影在线| 国产一区二区三区观看| 欧美日韩午夜在线| 中文字幕一区二区三区不卡在线 | 精品在线免费视频| 欧美三区免费完整视频在线观看| 国产女人18毛片水真多成人如厕| 日韩精品每日更新| 色综合一区二区三区| 国产性做久久久久久| 麻豆91精品91久久久的内涵| 色菇凉天天综合网| 欧美韩日一区二区三区四区| 久久99精品久久久久婷婷| 欧美日韩一卡二卡| 亚洲精品日韩综合观看成人91| 成人精品一区二区三区中文字幕| 日韩一二三四区| 日韩国产欧美一区二区三区| 欧美午夜精品久久久久久超碰| 国产精品女主播av| 国产成人免费视频网站高清观看视频| 制服丝袜国产精品| 亚洲妇熟xx妇色黄| 欧美日韩在线精品一区二区三区激情| 中文字幕在线免费不卡| 成人高清视频在线| 国产亚洲欧美中文| 国产美女一区二区| 精品国产区一区| 九九**精品视频免费播放| 欧美一二三四在线| 日韩精品乱码av一区二区| 884aa四虎影成人精品一区| 亚洲一线二线三线视频| 日本久久电影网| 亚洲在线视频一区| 欧美视频完全免费看| 亚洲国产中文字幕| 欧美日韩第一区日日骚| 日韩激情av在线| 欧美一级久久久| 九一九一国产精品| 国产视频在线观看一区二区三区| 国产传媒一区在线| 国产日产欧美一区二区视频| 成人做爰69片免费看网站| 日本一区二区三区视频视频| av日韩在线网站| 亚洲三级在线免费| 在线观看亚洲精品| 亚洲va在线va天堂| 欧美肥大bbwbbw高潮| 久久av老司机精品网站导航| 精品成a人在线观看| 国产精品中文字幕日韩精品| 欧美国产日韩亚洲一区| 不卡av电影在线播放| 国产精品成人在线观看| 日本久久电影网| 国产精品一线二线三线| 久久久国际精品| 成人动漫精品一区二区| 一区二区三区在线看| 91精品国产综合久久久久久| 精品在线亚洲视频| 中文字幕色av一区二区三区| 欧美视频你懂的| 精品一区二区三区免费观看| 国产精品你懂的在线欣赏| 欧美午夜精品理论片a级按摩| 青草av.久久免费一区| 国产区在线观看成人精品| 色综合久久精品| 日本在线不卡视频一二三区| 久久这里只有精品6| 成人一区二区三区在线观看| 亚洲综合成人在线| 精品国产伦一区二区三区观看体验| 成人高清在线视频| 丝袜亚洲另类丝袜在线| 国产日韩三级在线| 欧美日韩国产影片| 国产不卡视频在线播放| 亚洲综合激情网| 久久久久久亚洲综合| 欧美熟乱第一页| 国产在线麻豆精品观看| 一区二区在线免费观看| 久久亚洲春色中文字幕久久久| 色综合天天综合| 精品中文字幕一区二区小辣椒| 亚洲人一二三区| 日韩精品一区在线| 91激情在线视频| 国产成人精品1024| 亚洲高清免费在线| 国产精品免费视频一区| 在线成人小视频| 91麻豆文化传媒在线观看| 久久精品国产澳门| 亚洲一区二区三区四区五区黄| 国产欧美一区二区精品性色| 91精品国产麻豆| 在线观看日韩毛片| 成人av午夜影院| 黑人精品欧美一区二区蜜桃| 偷窥少妇高潮呻吟av久久免费|