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

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

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

public abstract class UintBase extends ASN1Object
{
    protected final BigInteger value;
    
    public UintBase(final BigInteger value) {
        this.value = value;
        this.assertLimit();
    }
    
    public UintBase(final int n) {
        this(BigInteger.valueOf(n));
    }
    
    public UintBase(final long val) {
        this(BigInteger.valueOf(val));
    }
    
    protected UintBase(final ASN1Integer asn1Integer) {
        this(asn1Integer.getValue());
    }
    
    public BigInteger getValue() {
        return this.value;
    }
    
    @Override
    public ASN1Primitive toASN1Primitive() {
        return new ASN1Integer(this.value);
    }
    
    protected abstract void assertLimit();
}
