class WeightClassificationUtils {

    public static WeightClass weightLowEqRegister(EqWeightResponse eqWeightResponse) {

        int badCount = 0;
        int okCount = 0;
        int goodCount = 0;

        for (Ratings rating : eqWeightResponse.getEqbands()) {
            if (isLowEqRegister(rating)) {
                if (rating.getRating().toLowerCase().contains("0")) {
                    badCount++;
                }

                if (rating.getRating().toLowerCase().contains("1")) {
                    okCount++;
                }

                if (rating.getRating().toLowerCase().contains("2")) {
                    goodCount++;
                }
            }
        }

        if (badCount >= okCount && badCount >= goodCount) {
            return WeightClass.BAD;
        }

        if (okCount >= goodCount && okCount >= badCount) {
            return WeightClass.OK;
        }

        return WeightClass.GOOD;
    }

}