class PcrSelection {

    public final boolean isPcrSelected(final int pcrNumber) {
        final int numBitsInByte = 8;
        final int mostSigBitInByte = 128;
        if (pcrNumber < 0) {
            LOGGER.error("negative PCR number");
            throw new IndexOutOfBoundsException("negative PCR number");
        }
        int byteIndex = pcrNumber / numBitsInByte;
        int bitIndex = pcrNumber % numBitsInByte;
        if (byteIndex > this.pcrSelect.length) {
            String msg = String.format(
                "index %d out of bounds, pcrSelect size is %d bytes",
                byteIndex, this.pcrSelect.length);
            LOGGER.error(msg);
            throw new IndexOutOfBoundsException(msg);
        }

        return (this.pcrSelect[byteIndex]
                & (mostSigBitInByte >>> bitIndex)) != 0;
    }

    protected  PcrSelection();
    public  PcrSelection(final byte[] pcrSelect);
    public  PcrSelection(final long pcrSelectLong);

}