Package org.kigalisim.lang.localization
Interface NumberParseUtilStrategy
- All Known Implementing Classes:
MixedParseStrategy,OnlyCommasParseStrategy,OnlyPeriodsParseStrategy,SingleDelimiterTemplate
public interface NumberParseUtilStrategy
Strategy for parsing numbers with specific separator patterns.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine if this strategy can handle the given separator pattern.parseNumber(String numberStr, int commaCount, int periodCount) Parse a number string using this strategy's specific rules.
-
Method Details
-
parseNumber
Parse a number string using this strategy's specific rules.- Parameters:
numberStr- The cleaned number string (without sign)commaCount- Number of commas in the stringperiodCount- Number of periods in the string- Returns:
- FlexibleNumberParseResult containing either parsed number or error
-
canHandle
Determine if this strategy can handle the given separator pattern.- Parameters:
numberStr- The number string to analyzecommaCount- Number of commas in the stringperiodCount- Number of periods in the string- Returns:
- true if this strategy can handle the pattern
-