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

    主站蜘蛛池模板: 亚洲 暴爽 AV人人爽日日碰| xxxxx做受大片在线观看免费| 91av在线免费视频| 无人在线观看完整免费版视频| 香蕉视频在线观看亚洲| 久久青青草原国产精品免费| 亚洲熟妇av一区二区三区| 久久免费99精品国产自在现线| 亚洲综合精品香蕉久久网| 亚洲av一本岛在线播放| 可以免费看黄的网站| 中文有码亚洲制服av片| 真实乱视频国产免费观看| 国产成人高清亚洲一区久久| 亚洲国产成人乱码精品女人久久久不卡 | 日韩版码免费福利视频| tom影院亚洲国产一区二区| 久久受www免费人成_看片中文| 亚洲卡一卡二卡乱码新区| 免费国产真实迷j在线观看| 一级特黄录像免费播放肥| 亚洲欧洲免费视频| 91麻豆最新在线人成免费观看| 亚洲精品无码久久久久秋霞| 亚洲国产精品一区二区第一页免 | 亚洲一区二区三区影院| 免费视频精品一区二区三区 | 无人视频免费观看免费视频| 国产综合亚洲专区在线| 99爱在线精品视频免费观看9| 亚洲人午夜射精精品日韩| 免费国产黄网站在线观看可以下载| 亚洲一区电影在线观看| 免费成人av电影| 日本亚洲欧洲免费天堂午夜看片女人员 | 国产精品成人四虎免费视频| 久久久久久久久久免免费精品| 久久精品a亚洲国产v高清不卡 | 中国一级特黄高清免费的大片中国一级黄色片 | 在线A亚洲老鸭窝天堂| 一级女人18毛片免费|