private boolean linkLast ( Node < E > node ) { // assert lock.isHeldByCurrentThread(); if ( count >= capacity ) return false ; Node < E > l = last ; node . prev = l ; last = node ; if ( first == null ) first = node ; else l . next = node ; ++ count ; notEmpty . signal ( ) ; return true ; }
Links node as last element or returns false if full .