org.pentaho.di.core.util
Class StringEvaluator

java.lang.Object
  extended by 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

Constructor Summary
StringEvaluator(boolean tryTrimming)
           
StringEvaluator(boolean tryTrimming, List<String> numberFormats, List<String> dateFormats)
           
 
Method Summary
 void evaluateString(String value)
           
 StringEvaluationResult getAdvicedResult()
           
 int getCount()
           
 List<String> getDateFormats()
           
 int getMaxLength()
           
 List<String> getNumberFormats()
           
 List<StringEvaluationResult> getStringEvaluationResults()
           
 Set<String> getValues()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringEvaluator

public StringEvaluator(boolean tryTrimming)

StringEvaluator

public StringEvaluator(boolean tryTrimming,
                       List<String> numberFormats,
                       List<String> dateFormats)
Method Detail

evaluateString

public void evaluateString(String value)

getAdvicedResult

public StringEvaluationResult getAdvicedResult()

getDateFormats

public List<String> getDateFormats()

getNumberFormats

public List<String> getNumberFormats()

getValues

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

getStringEvaluationResults

public List<StringEvaluationResult> getStringEvaluationResults()
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