withOptions method

  1. @override
RdfTriplesDecoder withOptions(
  1. RdfGraphDecoderOptions options
)
override

Creates a new decoder with the specified options

This method returns a new instance of the decoder configured with the provided options. The original decoder instance remains unchanged.

Parameters:

  • options Configuration options to customize the decoder's behavior.

Returns:

This pattern allows for immutable configuration of decoders and enables method chaining for readable configuration code.

Implementation

@override
RdfTriplesDecoder withOptions(RdfGraphDecoderOptions options) =>
    NTriplesToTriplesDecoder._(
      _decoder.withOptions(options is NTriplesDecoderOptions
          ? _toNQuadsOptions(options)
          : options) as NQuadsToQuadsDecoder,
    );