class BookingBucket implements Comparable {

    public AvrTBRInsight getAvrTBRInsight(Set<String> validBookingIds)
    {
        double nominator = 0;
        double denominator = 0;
        Impression maxImpression = new Impression();

        Map<String, List<Double>> bbAvgTBR = getAvgTbrMap();
        for (Map.Entry<String, List<Double>> entry : bbAvgTBR.entrySet())
        {
            String bkId = entry.getKey();
            if (validBookingIds.contains(bkId))
            {
                List<Double> values = entry.getValue();
                double tbr = values.get(1);
                nominator += values.get(0) * tbr;
                denominator += values.get(0);

                Impression _impression = new Impression(values.subList(2, 6).toArray(new Double[0]));
                _impression = Impression.multiply(_impression, tbr);
                if (_impression.getTotal() > maxImpression.getTotal())
                {
                    maxImpression = _impression;
                }
            }
        }

        final double _nominator = nominator;
        final double _denominator = denominator;
        final Impression _maxImpression = maxImpression;

        AvrTBRInsight avrTBRInsight = new AvrTBRInsight()
        {
            @Override
            public double getNominator()
            {
                return _nominator;
            }

            @Override
            public double getDenominator()
            {
                return _denominator;
            }

            @Override
            public Impression getMaxImpression()
            {
                return _maxImpression;
            }
        };

        return avrTBRInsight;
    }

    public  BookingBucket();
    public  BookingBucket(String day, String bookingId, List<String> previousBookingOrder, int priority);
    public  BookingBucket(String id, Map source);

}