public function withValidity(Validity $validity): self
    {
        $obj = clone $this;
        $obj->_validity = $validity;
        return $obj;
    }
public function withValidity(Validity $validity): self
    {
        $obj = clone $this;
        $obj->_validity = $validity;
        return $obj;
    }
public function withValidity ( Validity $ validity ) : self { $ obj = clone $ this ; $ obj -> _validity = $ validity ; return $ obj ; }
Get self with given validity.

@param Validity $validity
@return self
Get self with given validity .