码迷,mamicode.com
首页 > 其他好文 > 详细

LinkedList源代码深入剖析

时间:2016-03-12 22:42:20      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:

第1部分 LinkedList介绍
LinkedList简介
public class LinkedList<E>
    extends AbstractSequentialList<E>
    implements List<E>, Deque<E>, Cloneable, java.io.Serializable

LinkedList是一个继承于AbstractSequentialList的双向链表。它也可以被当作堆栈、队列或双端队列进行操作。
LinkedList实现List接口,能对它进行队列操作。
LinkedList实现Deque接口,即能将LinkedList当作双端队列使用。
LinkedList实现了Cloneable接口,即覆盖了函数clone(),能克隆。
LinkedList实现java.io.Serializable接口,这意味着LinkedList支持序列化,能通过序列化去传输。
LinkedList是非同步的。

LinkedList构造函数

/**
* Constructs an empty list.
*/
public LinkedList() {
}
/**
* Constructs a list containing the elements of the specified
* collection, in the order they are returned by the collection‘s
* iterator.*/
public LinkedList(Collection<? extends E> c) {
  this();
  addAll(c);
}

 

 


















































































































LinkedList源代码深入剖析

标签:

原文地址:http://www.cnblogs.com/winner-0715/p/5270302.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!