/*
 * Copyright 2015 52°North Initiative for Geospatial Open Source
 * Software GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.n52.iceland.util;

import java.math.BigInteger;
import java.util.Random;

/**
 *
 * @author Daniel Nüst <d.nuest@52north.org>
 */
public abstract class ValidatableBigInteger extends BigInteger {

    public ValidatableBigInteger(byte[] val) {
        super(val);
        validate();
    }

    public ValidatableBigInteger(int signum, byte[] magnitude) {
        super(signum, magnitude);
        validate();
    }

    public ValidatableBigInteger(String val, int radix) {
        super(val, radix);
        validate();
    }

    public ValidatableBigInteger(String val) {
        super(val);
        validate();
    }

    public ValidatableBigInteger(int numBits, Random rnd) {
        super(numBits, rnd);
        validate();
    }

    public ValidatableBigInteger(int bitLength, int certainty, Random rnd) {
        super(bitLength, certainty, rnd);
        validate();
    }

    protected abstract void validate();
    
}

@@ -781,16 +781,72 @@
 rg%3E%0A */%0A
+@SuppressWarnings(%22OverridableMethodCallInConstructor%22)%0A
 public a
@@ -901,16 +901,92 @@
 nteger %7B
+%0A    %0A    private static final long serialVersionUID = 6457955185468886192L;
 %0A%0A    pu

add missing serialversionuid