// 
// Decompiled by Procyon v0.6.0
// 

package org.bouncycastle.oer.its.ieee1609dot2.basetypes;

import org.bouncycastle.asn1.ASN1Integer;
import java.math.BigInteger;

public class UINT64 extends UintBase
{
    private static final BigInteger MAX;
    
    public UINT64(final BigInteger bigInteger) {
        super(bigInteger);
    }
    
    public UINT64(final int n) {
        super(n);
    }
    
    public UINT64(final long n) {
        super(n);
    }
    
    protected UINT64(final ASN1Integer asn1Integer) {
        super(asn1Integer);
    }
    
    public static UINT64 getInstance(final Object o) {
        if (o instanceof UINT64) {
            return (UINT64)o;
        }
        if (o != null) {
            return new UINT64(ASN1Integer.getInstance(o));
        }
        return null;
    }
    
    @Override
    protected void assertLimit() {
        if (this.value.signum() < 0) {
            throw new IllegalArgumentException("value must not be negative");
        }
        if (this.value.compareTo(UINT64.MAX) > 0) {
            throw new IllegalArgumentException("value must not exceed " + UINT64.MAX.toString(16));
        }
    }
    
    static {
        MAX = new BigInteger("18446744073709551615");
    }
}
