question: private long calculateCapacity ( long minimumCapacity ) { long newCapacity = Math . min ( Math . max ( capacity , 2 ) , minimumCapacity ) ; while ( newCapacity < Math . min ( minimumCapacity , maxCapacity ) ) { newCapacity <<= 1 ; } return Math . min ( newCapacity , maxCapacity ) ; }
target:  Calculates the next capacity that meets the given minimum capacity.