<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世界暢談 閱讀(920) 評論(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訪問處于隊列頭的元素。  回復  更多評論
      

    主站蜘蛛池模板: 三级毛片在线免费观看| 亚洲日本人成中文字幕| 中美日韩在线网免费毛片视频 | fc2成年免费共享视频网站| 国产极品粉嫩泬免费观看| 亚洲人成色99999在线观看| 永久免费av无码网站韩国毛片| 亚洲色欲或者高潮影院| 99视频精品全部免费观看| 亚洲激情在线视频| 免费视频成人片在线观看| 久久久久亚洲av无码专区导航| 最近最好最新2019中文字幕免费| 亚洲第一福利网站| 国产成人精品免费视频动漫| 亚洲天堂电影在线观看| 成人女人A级毛片免费软件 | 成人婷婷网色偷偷亚洲男人的天堂| 成年人在线免费观看| 久久精品国产亚洲AV天海翼| 亚洲国产精品丝袜在线观看| 三上悠亚在线观看免费| 久久亚洲sm情趣捆绑调教| 97免费人妻无码视频| 黄网站色成年片大免费高清| 久久精品国产亚洲Aⅴ蜜臀色欲| 永久在线观看免费视频| 亚洲av无码不卡久久| 国产成人免费A在线视频| 高清永久免费观看| 久久精品国产亚洲AV麻豆网站| 97无码免费人妻超级碰碰碰碰 | 国产美女无遮挡免费视频| eeuss影院免费直达入口| 久久精品国产亚洲| 三年片在线观看免费观看高清电影| 久久精品亚洲日本波多野结衣| 亚洲国产精品无码久久一线| 日本三级2019在线观看免费| 羞羞漫画小舞被黄漫免费| 亚洲AV无码久久精品狠狠爱浪潮|