类LinkedList

前端之家收集整理的这篇文章主要介绍了类LinkedList前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<span style="font-size:14px;">
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html" rel="nofollow" title="class in java.lang" style="text-decoration:none;color:rgb(76,107,135);">java.lang.Object
<ul class="inheritance" style="list-style-type:disc;">
<li style="display:inline;list-style:none;">
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/AbstractCollection.html" rel="nofollow" title="class in java.util" style="text-decoration:none;color:rgb(76,135);">java.util.AbstractCollection
<li style="display:inline;list-style:none;">
<ul class="inheritance" style="list-style-type:disc;">
<li style="display:inline;list-style:none;">
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/AbstractList.html" rel="nofollow" title="class in java.util" style="text-decoration:none;color:rgb(76,135);">java.util.AbstractList
<li style="display:inline;list-style:none;">
<ul class="inheritance" style="list-style-type:disc;">
<li style="display:inline;list-style:none;">
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/AbstractSequentialList.html" rel="nofollow" title="class in java.util" style="text-decoration:none;color:rgb(76,135);">java.util.AbstractSequentialList
<li style="display:inline;list-style:none;">
<ul class="inheritance" style="list-style-type:disc;"><li style="display:inline;list-style:none;">java.util.LinkedList

<dl style="color:rgb(53,56,51);">

<span style="font-size:14px;"><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html" rel="nofollow" title="interface in java.io" style="text-decoration:none;color:rgb(76,135);">Serializable, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html" rel="nofollow" title="interface in java.lang" style="text-decoration:none;color:rgb(76,135);">Cloneable, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html" rel="nofollow" title="interface in java.lang" style="text-decoration:none;color:rgb(76,135);">Iterable, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html" rel="nofollow" title="interface in java.util" style="text-decoration:none;color:rgb(76,135);">Collection, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Deque.html" rel="nofollow" title="interface in java.util" style="text-decoration:none;color:rgb(76,135);">Deque, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html" rel="nofollow" title="interface in java.util" style="text-decoration:none;color:rgb(76,135);">List, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Queue.html" rel="nofollow" title="interface in java.util" style="text-decoration:none;color:rgb(76,135);">Queue

<span style="font-size:14px;">3、双向链表是列表和双端队列的实现。它实现了列表的所有操作,可存储任意类型的数据,包括null。

方法来将其包含其中。这一操作最好在创建时即完成,以防止列表发生一些意外的非同步现象:

(new LinkedList());
方法失效很快:在迭代器创建后的任何时刻,如果列表的结构改变了,以任何方式通过迭代器自身的移除、添加方法,迭代器将会抛出ConcurrentModificationException异常。因此,在面对同时修改列表时,迭代器即刻失效,而非去承担一种“在后期的不确定时间里发生不确定性操作”的风险行为。
快速失效方法不能被认作是理所当然的,通常来讲,在多个修改非同步的情况下,我们竭力所做的任何保证都是不可能的。快速失效迭代器在被动地尽力基础上抛出“同步修改异常”。因此,写一个依赖于这一异常判定其正确性的程序是错误的:迭代器的快速失效操作仅仅应该被查找bug。
方法描述
 在列表尾部追加元素
 在列表指定位置添加元素 c) 在列表尾部添加全部元素,其顺序按照集合迭代器返回的顺序 c) 在指定位置开始,添加集合所有元素在列表头部添加元素在列表尾部添加元素移除列表中全部元素返回链表的浅表副本如果链表包含指定元素,则返回true双端队列中,以倒序的形式返回元素的迭代器检索列表头部,但不移除获得列表指定位置元素的值获得列表第一个元素的值获取列表最后一个元素的值获取列表中和指定元素第一个匹配的元素的索引,不存在时返回-1获取列表中和指定元素最后一个匹配的元素的索引,不存在时返回-1
从链表的指定位置开始,返回列表的一个迭代器()在列表尾部添加元素在列表头部添加元素在列表尾部添加元素返回列表的头元素,但不移除返回列表的头元素,但不移除;如果列表为空,返回null返回列表的尾部元素,但不移除;如果列表为空,返回null返回并移除列表的头元素返回并移除列表的头元素;如果列表为空,返回null返回并移除列表的尾部元素;如果列表为空,返回null取出一个由列表代替的栈的元素添加一个元素到一个由列表替代的栈中返回并移除列表头元素移除指定位置的元素移除列表中出现的第一个指定的元素,如果它存在移除并返回列表的第一个元素移除列表中出现的第一个指定的元素(遍历顺序为从头到尾)移除并返回列表的最后一个元素移除列表中出现的最后一个指定的元素(遍历顺序为从头到尾)在指定位置,替换为指定的元素返回列表中元素的个数
按照一定顺序(从头到尾),返回包含列表中所有元素的一个数组 T[]按照一定顺序(从头到尾),返回包含列表中所有元素的一个数组;返回数组类型由指定数组类型确定





nofollow" style="text-decoration:none;color:rgb(76,135);font-family:monospace;">iterator

猜你在找的Java相关文章