public void reestablishTotalCount ( ) { // On overflow, the totalCount accumulated counter will (always) not match the total of counts long totalCounted = 0 ; for ( int i = 0 ; i < countsArrayLength ; i ++ ) { totalCounted += getCountAtIndex ( i ) ; } setTotalCount ( totalCounted ) ; }
Reestablish the internal notion of totalCount by recalculating it from recorded values .