class ForecastingDetector extends AbstractOutlierDetector {

    @Override
    public DetectorResult detect(MetricData metricData) {
        notNull(metricData, "metricData can't be null");

        val pointForecast = pointForecaster.forecast(metricData);

        if (pointForecast == null) {
            return new OutlierDetectorResult(AnomalyLevel.UNKNOWN);
        } else if (pointForecast.isWarmup()) {
            return new OutlierDetectorResult(true, AnomalyLevel.UNKNOWN);
        }

        val intervalForecast = intervalForecaster.forecast(metricData, pointForecast.getValue());
        val thresholds = toAnomalyThresholds(intervalForecast);
        val observed = metricData.getValue();
        val level = classifier.classify(thresholds, observed);
        val trusted = isTrusted();

        return new OutlierDetectorResult(level)
                .setPredicted(pointForecast.getValue())
                .setThresholds(thresholds)
                .setTrusted(trusted);
    }

    public  ForecastingDetector(
            UUID uuid,
            PointForecaster pointForecaster,
            IntervalForecaster intervalForecaster,
            AnomalyType anomalyType,
            boolean trusted,
            String name);

}