Package org.pentaho.di.core.util
Class StringEvaluator
- java.lang.Object
-
- org.pentaho.di.core.util.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 Summary
Fields Modifier and Type Field Description protected static Pattern
PRECISION_PATTERN
-
Constructor Summary
Constructors Constructor Description StringEvaluator()
StringEvaluator(boolean tryTrimming)
StringEvaluator(boolean tryTrimming, String[] numberFormats, String[] dateFormats)
StringEvaluator(boolean tryTrimming, String[] numberFormats, String[] dateFormats, boolean autoScaling)
StringEvaluator(boolean tryTrimming, List<String> numberFormats, List<String> dateFormats)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static int
determinePrecision(String numericFormat)
void
evaluateString(String value)
StringEvaluationResult
getAdvicedResult()
int
getCount()
String[]
getDateFormats()
int
getMaxLength()
String[]
getNumberFormats()
List<StringEvaluationResult>
getStringEvaluationResults()
PDI-7736: Only list of successful evaluations returned.Set<String>
getValues()
-
-
-
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)
-
-
Method Detail
-
evaluateString
public void evaluateString(String value)
-
getAdvicedResult
public StringEvaluationResult getAdvicedResult()
-
getDateFormats
public String[] getDateFormats()
-
getNumberFormats
public String[] getNumberFormats()
-
determinePrecision
protected static int determinePrecision(String numericFormat)
-
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
-
-