Class SinkParameters
Defines options that are useful when constructing a Sink
TODO the name of this might need to change to something aligned with what it's actually used for - saving
-
Constructor Summary
ConstructorsConstructorDescriptionSinkParameters(String name, Struct type) SinkParameters(String name, Struct type, Optional<Format> format, Optional<? extends Format.FormatOptions> formatOptions) Creates a newSinkParametersinstance.SinkParameters(SinkParameters clone) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanA format the user has asked the data to be saved inOptional<? extends Format.FormatOptions>Options for the given format.getName()A name associate with theSink.getType()The type of the data that the sink is going to receive viaSink.accept(nz.org.riskscape.engine.Tuple).inthashCode()voidA format the user has asked the data to be saved invoidsetFormatOptions(Optional<? extends Format.FormatOptions> formatOptions) Options for the given format.voidA name associate with theSink.voidThe type of the data that the sink is going to receive viaSink.accept(nz.org.riskscape.engine.Tuple).toString()
-
Constructor Details
-
SinkParameters
-
SinkParameters
-
SinkParameters
public SinkParameters(String name, Struct type, Optional<Format> format, Optional<? extends Format.FormatOptions> formatOptions) Creates a new
SinkParametersinstance.- Parameters:
name- A name associate with theSink. If this sink is saving output, then this is going to be used as the name of the output, i.e it'll be part of the resulting filenametype- The type of the data that the sink is going to receive viaSink.accept(nz.org.riskscape.engine.Tuple).format- A format the user has asked the data to be saved informatOptions- Options for the given format.Should only be included if format is given and should be of the type
Format.getWriterOptionsClass().
-
-
Method Details
-
getName
A name associate with the
Sink. If this sink is saving output, then this is going to be used as the name of the output, i.e it'll be part of the resulting filename -
getType
The type of the data that the sink is going to receive via
Sink.accept(nz.org.riskscape.engine.Tuple). -
getFormat
A format the user has asked the data to be saved in
-
getFormatOptions
Options for the given format.
Should only be included if format is given and should be of the type
Format.getWriterOptionsClass(). -
setName
A name associate with the
Sink. If this sink is saving output, then this is going to be used as the name of the output, i.e it'll be part of the resulting filename -
setType
The type of the data that the sink is going to receive via
Sink.accept(nz.org.riskscape.engine.Tuple). -
setFormat
A format the user has asked the data to be saved in
-
setFormatOptions
Options for the given format.
Should only be included if format is given and should be of the type
Format.getWriterOptionsClass(). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-