List-LinkedList- 源代码 研究
2011年09月01日
List 接口:
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, Deque, List, Queue
add(E);
add(int index,E);
contains(Object);
remove(E);
remove(int);
get(int);
set(int,E);
push(E);
pop();
size();
成员变量:
private transient Entry header = new Entry(null, null, null); private transient int size = 0;
Entry类变量:
private static class Entry {
E element;
Entry next;
Entry previous;
由此可知:其实是实现了
2011年09月01日
List 接口:
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, Deque, List, Queue
add(E);
add(int index,E);
contains(Object);
remove(E);
remove(int);
get(int);
set(int,E);
push(E);
pop();
size();
成员变量:
private transient Entry header = new Entry(null, null, null); private transient int size = 0;
Entry类变量:
private static class Entry {
E element;
Entry next;
Entry previous;
由此可知:其实是实现了
本文详细探讨了List接口的实现方式,包括其核心成员方法、内部结构以及相关类Entry的作用,为开发者提供了一站式的接口理解指南。
839

被折叠的 条评论
为什么被折叠?



