public function equalsTo(MediaTypeInterface $mediaType): ?Decoding
    {
        return collect($this->stack)->first(function (Decoding $decoding) use ($mediaType) {
            return $decoding->equalsTo($mediaType);
        });
    }
public function equalsTo(MediaTypeInterface $mediaType): ?Decoding
    {
        return collect($this->stack)->first(function (Decoding $decoding) use ($mediaType) {
            return $decoding->equalsTo($mediaType);
        });
    }
public function equalsTo ( MediaTypeInterface $ mediaType ) : ? Decoding { return collect ( $ this -> stack ) -> first ( function ( Decoding $ decoding ) use ( $ mediaType ) { return $ decoding -> equalsTo ( $ mediaType ) ; } ) ; }
Get the decoding that matches the supplied media type.

@param MediaTypeInterface $mediaType
@return Decoding|null
Get the decoding that matches the supplied media type .