Class StringEvaluator


  • public class StringEvaluator
    extends Object
    This class evaluates strings and extracts a data type. It allows you to criteria after which the analysis should be completed.
    Author:
    matt
    • Field Detail

      • PRECISION_PATTERN

        protected static final Pattern PRECISION_PATTERN
    • Constructor Detail

      • StringEvaluator

        public StringEvaluator()
      • StringEvaluator

        public StringEvaluator​(boolean tryTrimming)
      • StringEvaluator

        public StringEvaluator​(boolean tryTrimming,
                               List<String> numberFormats,
                               List<String> dateFormats)
      • StringEvaluator

        public StringEvaluator​(boolean tryTrimming,
                               String[] numberFormats,
                               String[] dateFormats)
      • StringEvaluator

        public StringEvaluator​(boolean tryTrimming,
                               String[] numberFormats,
                               String[] dateFormats,
                               boolean autoScaling)
    • Method Detail

      • evaluateString

        public void evaluateString​(String value)
      • getDateFormats

        public String[] getDateFormats()
      • getNumberFormats

        public String[] getNumberFormats()
      • determinePrecision

        protected static int determinePrecision​(String numericFormat)
      • getValues

        public Set<String> getValues()
        Returns:
        The distinct set of string values
      • getStringEvaluationResults

        public List<StringEvaluationResult> getStringEvaluationResults()
        PDI-7736: Only list of successful evaluations returned.
        Returns:
        The list of string evaluation results
      • getCount

        public int getCount()
        Returns:
        the number of values analyzed
      • getMaxLength

        public int getMaxLength()
        Returns:
        The maximum string length encountered