BaseRow removeLast ( ) { Map . Entry < BaseRow , Collection < BaseRow > > last = treeMap . lastEntry ( ) ; BaseRow lastElement = null ; if ( last != null ) { Collection < BaseRow > list = last . getValue ( ) ; lastElement = getLastElement ( list ) ; if ( lastElement != null ) { if ( list . remove ( lastElement ) ) { currentTopNum -= 1 ; } if ( list . size ( ) == 0 ) { treeMap . remove ( last . getKey ( ) ) ; } } } return lastElement ; }
Removes the last record of the last Entry in the buffer .