question: private long [ ] convertToArray ( Map < String , Long > map , int size , boolean unitOffset ) { long [ ] values = new long [ size ] ; int arrayOffset = unitOffset ? - 1 : 0 ; for ( Map . Entry < String , Long > cursor : map . entrySet ( ) ) { int offset = Integer . parseInt ( cursor . getKey ( ) ) + arrayOffset ; values [ offset ] = cursor . getValue ( ) ; } return values ; }
target:  Will convert a (possibly sparse) map whose keys are String versions of numbers between 0 and size, to an array.