question: private void checkAndSetFastPathStatus ( ) { boolean fastPathWasOn = isFastPath ; if ( ( roundingMode == RoundingMode . HALF_EVEN ) && ( isGroupingUsed ( ) ) && ( groupingSize == 3 ) && ( multiplier == 1 ) && ( ! decimalSeparatorAlwaysShown ) && ( ! useExponentialNotation ) ) { isFastPath = ( ( minimumIntegerDigits == 1 ) && ( maximumIntegerDigits >= 10 ) ) ; if ( isFastPath ) { if ( isCurrencyFormat ) { if ( ( minimumFractionDigits != 2 ) || ( maximumFractionDigits != 2 ) ) isFastPath = false ; } else if ( ( minimumFractionDigits != 0 ) || ( maximumFractionDigits != 3 ) ) isFastPath = false ; } } else isFastPath = false ; if ( isFastPath ) { if ( fastPathData == null ) fastPathData = new FastPathData ( ) ; fastPathData . zeroDelta = symbols . getZeroDigit ( ) - '0' ; fastPathData . groupingChar = symbols . getGroupingSeparator ( ) ; fastPathData . fractionalMaxIntBound = ( isCurrencyFormat ) ? 99 : 999 ; fastPathData . fractionalScaleFactor = ( isCurrencyFormat ) ? 100.0d : 1000.0d ; fastPathData . positiveAffixesRequired = ( positivePrefix . length ( ) != 0 ) || ( positiveSuffix . length ( ) != 0 ) ; fastPathData . negativeAffixesRequired = ( negativePrefix . length ( ) != 0 ) || ( negativeSuffix . length ( ) != 0 ) ; int maxNbIntegralDigits = 10 ; int maxNbGroups = 3 ; int containerSize = Math . max ( positivePrefix . length ( ) , negativePrefix . length ( ) ) + maxNbIntegralDigits + maxNbGroups + 1 + maximumFractionDigits + Math . max ( positiveSuffix . length ( ) , negativeSuffix . length ( ) ) ; fastPathData . fastPathContainer = new char [ containerSize ] ; fastPathData . charsPositiveSuffix = positiveSuffix . toCharArray ( ) ; fastPathData . charsNegativeSuffix = negativeSuffix . toCharArray ( ) ; fastPathData . charsPositivePrefix = positivePrefix . toCharArray ( ) ; fastPathData . charsNegativePrefix = negativePrefix . toCharArray ( ) ; int longestPrefixLength = Math . max ( positivePrefix . length ( ) , negativePrefix . length ( ) ) ; int decimalPointIndex = maxNbIntegralDigits + maxNbGroups + longestPrefixLength ; fastPathData . integralLastIndex = decimalPointIndex - 1 ; fastPathData . fractionalFirstIndex = decimalPointIndex + 1 ; fastPathData . fastPathContainer [ decimalPointIndex ] = isCurrencyFormat ? symbols . getMonetaryDecimalSeparator ( ) : symbols . getDecimalSeparator ( ) ; } else if ( fastPathWasOn ) { fastPathData . fastPathContainer = null ; fastPathData . charsPositiveSuffix = null ; fastPathData . charsNegativeSuffix = null ; fastPathData . charsPositivePrefix = null ; fastPathData . charsNegativePrefix = null ; } fastPathCheckNeeded = false ; }
target:  Check validity of using fast-path for this instance. If fast-path is valid for this instance, sets fast-path state as true and initializes fast-path utility fields as needed. This method is supposed to be called rarely, otherwise that will break the fast-path performance. That means avoiding frequent changes of the properties of the instance, since for most properties, each time a change happens, a call to this method is needed at the next format call. FAST-PATH RULES: Similar to the default DecimalFormat instantiation case. More precisely: - HALF_EVEN rounding mode, - isGroupingUsed() is true, - groupingSize of 3, - multiplier is 1, - Decimal separator not mandatory, - No use of exponential notation, - minimumIntegerDigits is exactly 1 and maximumIntegerDigits at least 10 - For number of fractional digits, the exact values found in the default case: Currency : min = max = 2. Decimal  : min = 0. max = 3.