<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Oracle神諭

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks

    public class PriorityQueue<E>extends AbstractQueue<E>implements Serializable
    An unbounded priority queue based on a priority heap. This queue orders elements according to an order specified at construction time, which is specified either according to their natural order (see Comparable), or according to a Comparator, depending on which constructor is used. A priority queue does not permit null elements. A priority queue relying on natural ordering also does not permit insertion of non-comparable objects (doing so may result in ClassCastException).
      一個極大的優先隊列基于一個優先堆棧。這個隊列按照一個限定在構造時間順序排列元素,這是也是按照它們的自然的順序(查看Comparable)限定的,或者按照一個Comparator,依靠使用的構造子。一個優先隊列不允許為空元素。一個優先隊列依靠自然順序也不允許插入一個非comparable對象(這樣做會產生ClassCastException的結果)。

    The head of this queue is the least element with respect to the specified ordering. If multiple elements are tied for least value, the head is one of those elements -- ties are broken arbitrarily. The queue retrieval operations poll, remove, peek, and element access the element at the head of the queue.
      這個隊列頭是最小的元素伴隨期望限定的排序。如果多個元素為最小的值約束,頭是這些元素中的一個---約束是任意打斷的。隊列獲得操作poll(推),remove(移除),peek 和在隊列頭部的元素

    A priority queue is unbounded, but has an internal capacity governing the size of an array used to store the elements on the queue. It is always at least as large as the queue size. As elements are added to a priority queue, its capacity grows automatically. The details of the growth policy are not specified.
      一個優先隊列是極大的,但是擁有一個內部的容量調節數組的大小用來存儲在隊列中的元素。它總是至少和隊列大小是是一樣大小的。作為元素被加入一個優先隊列,它的容量是自動增加的。增加策略的細節是沒有指定的。

    This class and its iterator implement all of the optional methods of the Collection and Iterator interfaces. The Iterator provided in method iterator() is not guaranteed to traverse the elements of the PriorityQueue in any particular order. If you need ordered traversal, consider using Arrays.sort(pq.toArray()).
      這個類和它的枚舉實現所有可選的集合和枚舉接口的方法。這個枚舉支持iterator()方法是不保證在任何特定的順序遍歷PriorityQueue的元素。如果你需要順序的遍歷,考慮使用Array.sort(pq.toArray()).

    Note that this implementation is not synchronized. Multiple threads should not access a PriorityQueue instance concurrently if any of the threads modifies the list structurally. Instead, use the thread-safe PriorityBlockingQueue class.
      注意這個實現不是不同步的。多個線程不應當并發訪問一個PriorityQueue實例,如果線程在結構上線程任一個被修改。作為替換,使用線程安全的PriorityBlockingQueue類。

    Implementation note: this implementation provides O(log(n)) time for the insertion methods (offer, poll, remove() and add) methods; linear time for the remove(Object) and contains(Object) methods; and constant time for the retrieval methods (peek, element, and size).

    This class is a member of the Java Collections Framework.

     

    Since:
    1.5
    See Also:
    Serialized Form

    posted on 2005-10-09 23:10 java世界暢談 閱讀(911) 評論(1)  編輯  收藏 所屬分類: JAVA

    評論

    # re: PriorityQueue類API 翻譯 2005-12-11 12:49 gramy
    An unbounded priority queue based on a priority heap. This queue orders elements according to an order specified at construction time, which is specified either according to their natural order (see Comparable), or according to a Comparator, depending on which constructor is used. A priority queue does not permit null elements. A priority queue relying on natural ordering also does not permit insertion of non-comparable objects (doing so may result in ClassCastException).
    一個基于優先級堆的極大優先級隊列。該隊列按照構造時所指定的順序對元素排序,既可以根據元素的自然順序來制定排序(參閱Comparable),也可以根據Comparator來指定,這取決于使用哪種構造方法。優先級隊列不允許null元素。依靠自然排序的優先級隊列還不允許插入不可比較的對象(這樣做可能導致ClassCastException)。
    The head of this queue is the least element with respect to the specified ordering. If multiple elements are tied for least value, the head is one of those elements -- ties are broken arbitrarily. The queue retrieval operations poll, remove, peek, and element access the element at the head of the queue.
    此隊列的頭是按照指定排序方式的最小元素。如果多個元素有最小值,則頭是其中的一個元素——選擇方法是任意的。隊列檢索操作poll,remove,peek,element訪問處于隊列頭的元素。  回復  更多評論
      

    主站蜘蛛池模板: 亚洲精品中文字幕乱码影院| 好吊妞788免费视频播放| 午夜亚洲av永久无码精品| 亚洲视频在线观看一区| 成人性生交大片免费看中文| 亚洲无线码在线一区观看| 一区二区免费在线观看| 亚洲伊人久久综合影院| 国产一二三四区乱码免费| 亚洲色精品aⅴ一区区三区| 免费在线看黄网站| 中文字幕亚洲精品| 思思re热免费精品视频66 | 77777亚洲午夜久久多人| 中国一级特黄的片子免费| 亚洲成a人片在线观看中文动漫| 免费A级毛片在线播放| 亚洲午夜精品一区二区公牛电影院 | 色婷婷综合缴情综免费观看| 成年人视频在线观看免费| 免费福利资源站在线视频| 国产成人精品日本亚洲专区61 | 91在线精品亚洲一区二区| 无码人妻久久一区二区三区免费丨 | 亚洲精品成a人在线观看| 国产永久免费高清在线| 亚洲最新在线视频| 蜜臀91精品国产免费观看| 亚洲视频在线免费| 亚洲国产理论片在线播放| 情侣视频精品免费的国产| 一区二区三区无码视频免费福利| 亚洲国产女人aaa毛片在线| 最近中文字幕无吗高清免费视频| 黄页网站在线免费观看| 亚洲V无码一区二区三区四区观看| 日本妇人成熟免费中文字幕 | 亚洲国产亚洲片在线观看播放| 午夜dj在线观看免费视频| A级毛片成人网站免费看| 亚洲免费观看在线视频|