public function setFormats($formats)
    {
        $this->formats = Type::forceAndReturn($formats, ArrayAccess::class);
        $this->formatCache = [];
        return $this;
    }
public function setFormats($formats)
    {
        $this->formats = Type::forceAndReturn($formats, ArrayAccess::class);
        $this->formatCache = [];
        return $this;
    }
public function setFormats ( $ formats ) { $ this -> formats = Type :: forceAndReturn ( $ formats , ArrayAccess :: class ) ; $ this -> formatCache = [ ] ; return $ this ; }
Set all the format definitions.

@param array|\ArrayAccess $formats

@return $this
Set all the format definitions .