public function asBoolean(): Primitive\Boolean
    {
        if (!$this->_element instanceof Primitive\Boolean) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_BOOLEAN));
        }
        return $this->_element;
    }
public function asBoolean(): Primitive\Boolean
    {
        if (!$this->_element instanceof Primitive\Boolean) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_BOOLEAN));
        }
        return $this->_element;
    }
public function asBoolean ( ) : Primitive \ Boolean { if ( ! $ this -> _element instanceof Primitive \ Boolean ) { throw new \ UnexpectedValueException ( $ this -> _generateExceptionMessage ( Element :: TYPE_BOOLEAN ) ) ; } return $ this -> _element ; }
Get the wrapped element as a boolean type.

@throws \UnexpectedValueException If the element is not a boolean
@return \ASN1\Type\Primitive\Boolean
Get the wrapped element as a boolean type .