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

package ch.randelshofer.fastdoubleparser.bte;

import java.util.Set;

final class ByteSetOfOne implements ByteSet
{
    private final byte ch;
    
    ByteSetOfOne(final Set<Character> set) {
        if (set.size() != 1) {
            throw new IllegalArgumentException("set size must be 1, size=" + set.size());
        }
        final char ch = set.iterator().next();
        if (ch > '\u007f') {
            throw new IllegalArgumentException("can not map to a single byte. ch='" + ch + "' 0x" + Integer.toHexString(ch));
        }
        this.ch = (byte)ch;
    }
    
    @Override
    public boolean containsKey(final byte b) {
        return this.ch == b;
    }
}
