Class StringSuffixOutputNameStyle
Object
org.anchoranalysis.io.output.namestyle.OutputNameStyle
org.anchoranalysis.io.output.namestyle.IndexableOutputNameStyle
org.anchoranalysis.io.output.namestyle.StringSuffixOutputNameStyle
- All Implemented Interfaces:
Serializable
public class StringSuffixOutputNameStyle extends IndexableOutputNameStyle
Outputs a file-name involving a string suffix.
- Author:
- Owen Feehan
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description StringSuffixOutputNameStyle()Empty constructor, as needed for deserialization.StringSuffixOutputNameStyle(String outputName, Optional<String> prefix)Creates with an output-name. -
Method Summary
Modifier and Type Method Description IndexableOutputNameStyleduplicate()Deep copy the current object.protected StringfilenameFromOutputFormatString(String outputFormatString, String index)Constructs a file name from the output format string and an index.protected StringoutputFormatString()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, filenameWithoutExtensionMethods 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:OutputNameStyleDeep copy the current object.- Specified by:
duplicatein classIndexableOutputNameStyle- Returns:
- a newly created copy.
-
filenameFromOutputFormatString
Description copied from class:IndexableOutputNameStyleConstructs a file name from the output format string and an index.- Specified by:
filenameFromOutputFormatStringin 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:IndexableOutputNameStyleA format-string as recognized byString.format(java.lang.String, java.lang.Object...)that expects a single string element.- Specified by:
outputFormatStringin classIndexableOutputNameStyle- Returns:
- the format-string.
-