摘要:
ArrayList源码分析,基本和Vector一致,去掉了synchronized 阅读全文
posted @ 2019-10-25 13:20
六月过半
阅读(155)
评论(0)
推荐(0)
摘要:
一个双向队列的结构分析, java //添加到队首 public void addFirst(E e) { if (e == null) throw new NullPointerException(); //head从队尾依次往前 elements[head = (head 1) & (eleme 阅读全文
posted @ 2019-10-25 12:59
六月过半
阅读(217)
评论(0)
推荐(0)
摘要:
队列结构,源码分析 java public ArrayQueue(int capacity) { //容量 this.capacity = capacity + 1; //队列 this.queue = newArray(capacity + 1); //头指针 this.head = 0; //尾 阅读全文
posted @ 2019-10-25 11:39
六月过半
阅读(279)
评论(0)
推荐(0)
摘要:
Stack是基于Vector的一个FIFO的栈结构 阅读全文
posted @ 2019-10-25 10:20
六月过半
阅读(161)
评论(0)
推荐(0)
摘要:
看了下Vector的数据结构,简要记录下。 成员变量 添加方法 阅读全文
posted @ 2019-10-25 09:21
六月过半
阅读(184)
评论(0)
推荐(0)