Node < E > append ( E element ) { for ( ; ; ) { Node < E > f = getNext ( ) ; if ( f == null || f . isMarker ( ) ) return null ; Node < E > x = new Node < E > ( element , f , this ) ; if ( casNext ( f , x ) ) { f . setPrev ( x ) ; // optimistically link return x ; } } }
Tries to insert a node holding element as successor failing if this node is deleted .