String serializeToString ( ) { final StringBuilder sb = new StringBuilder ( ) ; sb . append ( String . format ( "%d,%d," , numActive , keys . length ) ) ; for ( int i = 0 ; i < keys . length ; i ++ ) { if ( states [ i ] != 0 ) { sb . append ( String . format ( "%d,%d," , keys [ i ] , values [ i ] ) ) ; } } return sb . toString ( ) ; }
Returns a String representation of this hash map .