class DoublePair implements Comparable<DoublePair> {

        private double left;
        private double right;

        private DoublePair(double left, double right) {
            this.left = left;
            this.right = right;
        }

        public void addLeft(double value) {
            this.left += value;
        }

        public void addRight(double value) {
            this.right += value;
        }

        public double left() {
            return this.left;
        }

        public void left(double value) {
            this.left = value;
        }

        public double right() {
            return this.right;
        }

        public void right(double value) {
            this.right = value;
        }

        @Override
        public String toString() {
            StringBuilder sb = new StringBuilder();
            sb.append("left:").append(this.left)
              .append(", right: ").append(this.right);
            return sb.toString();
        }

        @Override
        public boolean equals(Object obj) {<FILL_FUNCTION_BODY>}

        @Override
        public int hashCode() {
            return Double.hashCode(this.left) ^ Double.hashCode(this.right);
        }

        // only left saves the rank value.
        @Override
        public int compareTo(DoublePair o) {
            double result = this.left - o.left;
            if (result > 0.0) {
                return 1;
            } else if (result < 0.0) {
                return -1;
            }
            return 0;
        }
    }

            if (!(obj instanceof DoublePair)) {
                return false;
            }
            DoublePair other = (DoublePair) obj;
            return this.left == other.left && this.right == other.right;
        
<methods>public non-sealed void <init>() ,public java.lang.String category() <variables>private static final int MAX_TIMES