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

package ch.randelshofer.fastdoubleparser.bte;

final class ConsecutiveByteDigitSet implements ByteDigitSet
{
    private final byte zeroDigit;
    
    public ConsecutiveByteDigitSet(final char zeroDigit) {
        if (zeroDigit > '\u007f') {
            throw new IllegalArgumentException("can not map to a single byte. zeroDigit=" + zeroDigit + "' 0x" + Integer.toHexString(zeroDigit));
        }
        this.zeroDigit = (byte)zeroDigit;
    }
    
    @Override
    public int toDigit(final byte ch) {
        return (char)(ch - this.zeroDigit);
    }
}
