protected boolean validateParameters(ParameterBlock args,
                                         StringBuffer msg) {

        if ( args == null || msg == null ) {
            throw new IllegalArgumentException(JaiI18N.getString("Generic0"));
        }

        if (!super.validateParameters(args, msg)) {
            return false;
        }

        int[] numBins = (int[])args.getObjectParameter(3);
        double[] lowValue = (double[])args.getObjectParameter(4);
        double[] highValue = (double[])args.getObjectParameter(5);

        int l1 = numBins.length;
        int l2 = lowValue.length;
        int l3 = highValue.length;

        int length = Math.max(l1, Math.max(l2, l3));

        for (int i = 0; i < length; i++) {
            if (i < l1 && numBins[i] <= 0) {
                msg.append(getName() + " " +
                       JaiI18N.getString("HistogramDescriptor7"));
                return false;
            }

            double l = i < l2 ? lowValue[i] : lowValue[0];
            double h = i < l3 ? highValue[i] : highValue[0];

            if (l >= h) {
                msg.append(getName() + " " +
                       JaiI18N.getString("HistogramDescriptor8"));
                return false;
            }
        }

        return true;
    }