private ColumnType detectType ( List < String > valuesList , ReadOptions options ) { CopyOnWriteArrayList < AbstractColumnParser < ? > > parsers = new CopyOnWriteArrayList <> ( getParserList ( typeArray , options ) ) ; CopyOnWriteArrayList < ColumnType > typeCandidates = new CopyOnWriteArrayList <> ( typeArray ) ; for ( String s : valuesList ) { for ( AbstractColumnParser < ? > parser : parsers ) { if ( ! parser . canParse ( s ) ) { typeCandidates . remove ( parser . columnType ( ) ) ; parsers . remove ( parser ) ; } } } return selectType ( typeCandidates ) ; }
Returns a predicted ColumnType derived by analyzing the given list of undifferentiated strings read from a column in the file and applying the given Locale and options