/** * Linked list node class * 链表节点内部类 */ staticclassNode<E> { //节点元素 E item;
/** * One of: * 之一: * - the real successor Node * 真正的继承节点 * - this Node, meaning the successor is head.next * 这个节点表示继承节点是head.next * - null, meaning there is no successor (this is the last node) * null,表示没有继承节点,它是尾节点 */ Node<E> next;
Node(E x) { item = x; } }
/** * The capacity bound, or Integer.MAX_VALUE if none * 容量界限,如果未设定,则为Integer最大值 */ privatefinalint capacity;
/** * Current number of elements * 当前元素个数 */ privatefinalAtomicIntegercount=newAtomicInteger();