国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

java.util.List翻譯

2019-11-18 11:34:27
字體:
來源:轉載
供稿:網友

 Overview Package  Class Use Tree DePRecated Index Help javaTM 2 Platform
Std. Ed. v1.4.2
 PREV CLASS   NEXT CLASSFRAMES    NO FRAMES     All Classes SUMMARY: NESTED  FIELD  CONSTR  METHODDETAIL: FIELD  CONSTR  METHOD


java.util
Interface List

All Superinterfaces:
Collection
All Known Implementing Classes:
AbstractList, ArrayList, LinkedList, Vector

public interface List
extends Collection

An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list. 有序的集合(也被稱為sequence)。該接口的用戶可以精確控制列表元素插入的位置。 用戶可以通過整數下標(列表中的位置)訪問、查找列表中的元素。

Unlike sets, lists typically allow duplicate elements. More formally, lists typically allow pairs of elements e1 and e2 sUCh that e1.equals(e2), and they typically allow multiple null elements if they allow null elements at all. It is not inconceivable that someone might wish to implement a list that prohibits duplicates, by throwing runtime exceptions when the user attempts to insert them, but we eXPect this usage to be rare. 和set不同,列表通常答應重復元素。也就是說,列表通常答應e1.equals(e2)這樣的 元素對e1和e2,假如答應null元素的話,通常也答應重復的null元素。 假如有人希望實現list而當用戶試圖插入重復元素時拋出運行時異常來禁止重復,這是不可思議的, 我們希望這樣的用法極少。

The List interface places additional stipulations, beyond those specified in the Collection interface, on the contracts of the iterator, add, remove, equals, and hashCode methods. Declarations for other inherited methods are also included here for convenience. 對于iterator、add、remove、equals和hashCode方法,除了遵守Collection接口中指定的 以外,List接口還提供了額外的約定。按照慣例,還包括其他繼續來的方法聲明。

The List interface provides four methods for positional (indexed) access to list elements. Lists (like Java arrays) are zero based. Note that these Operations may execute in time proportional to the index value for some implementations (the LinkedList class, for example). Thus, iterating over the elements in a list is typically preferable to indexing through it if the caller does not know the implementation. List接口提供了一些通過下標訪問列表元素的四個可選方法。List和Java數組一樣,是基于0的。 注重對于某些實現(比如LinkedList類)這些操作的執行時間和下標值成正比。 因此假如調用者不了解實現方式,通常應該遍歷列表元素,這比指定下標位置更可取。



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 威信县| 绥中县| 廉江市| 六安市| 岳池县| 蕲春县| 白朗县| 佛教| 洛南县| 芷江| 江源县| 威海市| 达孜县| 揭阳市| 耿马| 渭南市| 德钦县| 青海省| 景洪市| 富蕴县| 邯郸市| 隆德县| 黄龙县| 清水河县| 西藏| 沂源县| 望奎县| 绍兴市| 江西省| 合川市| 本溪| 金湖县| 淮南市| 利辛县| 密云县| 仪陇县| 辛集市| 泰和县| 万盛区| 乌什县| 修水县|