class HourOfDayDetectionFilter implements DetectionFilter {

    @Override
    public void doFilter(DetectorRequest detectorRequest, DetectorResponse detectorResponse, DetectionFilterChain chain) {
        notNull(detectorRequest, "metricData can't be null");
        if (metricTimeFallsWithinFilter(detectorRequest.getMetricData())) {
            // Metric passes time filter - pass it along to the detector/next filter
            chain.doFilter(detectorRequest, detectorResponse);
        } else {
            // Metric fails time filter - set empty response and abort chain
            OutlierDetectorResult emptyResult = new OutlierDetectorResult();
            detectorResponse.setDetectorResult(emptyResult);
        }
    }

    public  HourOfDayDetectionFilter(@JsonProperty("utcStartHour") int utcStartHour,
                                    @JsonProperty("utcEndHour") int utcEndHour);

}