class LocationDetector implements CellDetector<LocationResults> {

    @Override
    public ValuesWithConfidence<LocationResults> detect(CellSampler sampler)
    {
        LocationResults aggregateResults = new LocationResults();
        List<LocationDecider> deciders = LocationDeciderFactory.getInstance().buildDeciders(myPrefsRegistry);
        for (LocationDecider decider : deciders)
        {
            LocationResults results = decider.determineLocationColumns(sampler);
            List<LatLonColumnResults> latLonResults = results.getLatLonResults();
            if (latLonResults != null && !latLonResults.isEmpty())
            {
                for (LatLonColumnResults latLonResult : latLonResults)
                {
                    if (latLonResult.getConfidence() > 0)
                    {
                        aggregateResults.addResult(latLonResult);
                    }
                }
            }

            List<PotentialLocationColumn> locResults = results.getLocationResults();
            if (locResults != null && !locResults.isEmpty())
            {
                for (PotentialLocationColumn locResult : locResults)
                {
                    if (locResult.getConfidence() > 0)
                    {
                        aggregateResults.addResult(locResult);
                    }
                }
            }
        }

        LocationFormatDetector lfd = new LocationFormatDetector();
        lfd.detectLocationColumnFormats(aggregateResults, sampler.getBeginningSampleCells());

        return new ValuesWithConfidence<LocationResults>(aggregateResults, Math.max(0f, aggregateResults.getConfidence()));
    }

    public  LocationDetector(PreferencesRegistry prefsRegistry);

}