public function asInteger(): Primitive\Integer
    {
        if (!$this->_element instanceof Primitive\Integer) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_INTEGER));
        }
        return $this->_element;
    }
public function asInteger(): Primitive\Integer
    {
        if (!$this->_element instanceof Primitive\Integer) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_INTEGER));
        }
        return $this->_element;
    }
public function asInteger ( ) : Primitive \ Integer { if ( ! $ this -> _element instanceof Primitive \ Integer ) { throw new \ UnexpectedValueException ( $ this -> _generateExceptionMessage ( Element :: TYPE_INTEGER ) ) ; } return $ this -> _element ; }
Get the wrapped element as an integer type.

@throws \UnexpectedValueException If the element is not an integer
@return \ASN1\Type\Primitive\Integer
Get the wrapped element as an integer type .