Class StringSuffixOutputNameStyle
Object
OutputNameStyle
IndexableOutputNameStyle
StringSuffixOutputNameStyle
- All Implemented Interfaces:
Serializable
Outputs a file-name involving a string suffix.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor, as needed for deserialization.StringSuffixOutputNameStyle
(String outputName, Optional<String> prefix) Creates with an output-name. -
Method Summary
Modifier and TypeMethodDescriptionDeep copy the current object.protected String
filenameFromOutputFormatString
(String outputFormatString, String index) Constructs a file name from the output format string and an index.protected String
A format-string as recognized byString.format(java.lang.String, java.lang.Object...)
that expects a single string element.Methods inherited from class org.anchoranalysis.io.output.namestyle.IndexableOutputNameStyle
filenameWithoutExtension, filenameWithoutExtension, filenameWithoutExtension
Methods inherited from class org.anchoranalysis.io.output.namestyle.OutputNameStyle
getOutputName, setOutputName
-
Constructor Details
-
StringSuffixOutputNameStyle
public StringSuffixOutputNameStyle()Empty constructor, as needed for deserialization. -
StringSuffixOutputNameStyle
Creates with an output-name.- Parameters:
outputName
- the output-name (without any prefix).prefix
- an optional prefix that is prepended tooutputName
.
-
-
Method Details
-
duplicate
Description copied from class:OutputNameStyle
Deep copy the current object.- Specified by:
duplicate
in classIndexableOutputNameStyle
- Returns:
- a newly created copy.
-
filenameFromOutputFormatString
Description copied from class:IndexableOutputNameStyle
Constructs a file name from the output format string and an index.- Specified by:
filenameFromOutputFormatString
in classIndexableOutputNameStyle
- Parameters:
outputFormatString
- a format-string as recognized byString.format(java.lang.String, java.lang.Object...)
that expects a single string element (what will be populated byindex
) to form the name.index
- the index, unique within a set of filenames being outputted.- Returns:
- the file-name as a string.
-
outputFormatString
Description copied from class:IndexableOutputNameStyle
A format-string as recognized byString.format(java.lang.String, java.lang.Object...)
that expects a single string element.- Specified by:
outputFormatString
in classIndexableOutputNameStyle
- Returns:
- the format-string.
-