class ColumnFormatDetector implements LineDetector<ColumnFormatParameters> {

    @Override
    public ValuesWithConfidence<? extends ColumnFormatParameters> detect(LineSampler sampler)
    {
        // Determine delimiter
        ColumnDelimiterDetector delimiterDetector = new ColumnDelimiterDetector();
        ValuesWithConfidence<DelimitedColumnFormatParameters> delimitedFormat = delimiterDetector.detect(sampler);

        // Determine fixed column widths
        ColumnWidthDetector widthDetector = new ColumnWidthDetector();
        ValuesWithConfidence<FixedWidthColumnFormatParameters> fixedWidthFormat = widthDetector.detect(sampler);

        // Figure out the winner
        ValuesWithConfidence<? extends ColumnFormatParameters> format = determineWinner(delimitedFormat, fixedWidthFormat);

        return format;
    }

}