<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訪問處于隊列頭的元素。  回復  更多評論
      

    主站蜘蛛池模板: 人妻在线日韩免费视频| 亚洲日韩激情无码一区| 午夜老司机永久免费看片| jzzijzzij在线观看亚洲熟妇| 亚洲欧洲免费视频| 亚洲中久无码不卡永久在线观看| 最近2019中文字幕免费看最新| 久久久久久国产精品免费免费男同 | 夭天干天天做天天免费看| 久久国产免费一区| 三年片免费高清版| 成年网在线观看免费观看网址| 亚洲午夜无码久久| 国产成人精品日本亚洲18图| 久久久久亚洲Av片无码v| 久久久久亚洲AV成人网人人网站| 免费午夜爽爽爽WWW视频十八禁| 成人黄18免费视频| 久久久高清免费视频| 免费观看国产网址你懂的| 免费A级毛片在线播放| 最近2019中文免费字幕在线观看| 一个人看www免费高清字幕| 黄色一级视频免费| 羞羞视频免费网站含羞草| 亚洲AV无码一区二区大桥未久| 亚洲日韩精品国产3区| 亚洲最大中文字幕无码网站| 亚洲国产中文在线二区三区免| 亚洲毛片无码专区亚洲乱| 亚洲天堂久久精品| 亚洲美女人黄网成人女| 久久久久亚洲AV无码麻豆| 久久久久亚洲Av无码专| 亚洲欧洲中文日产| 亚洲永久在线观看| 亚洲av永久无码精品网址| 国产精品亚洲一区二区在线观看 | 国产四虎免费精品视频| 91麻豆最新在线人成免费观看| 国产免费不卡视频|