Class IndexableOutputNameStyle
Object
OutputNameStyle
IndexableOutputNameStyle
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IntegerSuffixOutputNameStyle
,StringSuffixOutputNameStyle
An output-name with an index somehow appended or prepended in a particular style.
The no-arguments constructor exists only for deserialization.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Empty constructor, as needed for deserialization.protected
IndexableOutputNameStyle
(String outputName) Creates with an output-name.protected
Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract IndexableOutputNameStyle
Deep copy the current object.protected abstract String
filenameFromOutputFormatString
(String outputFormatString, String index) Constructs a file name from the output format string and an index.The filename to be written, including prefix, suffix, etc. but excluding extension (and any period before the extension).filenameWithoutExtension
(int index) LikefilenameWithoutExtension()
but incorporates an integer index.filenameWithoutExtension
(String index) LikefilenameWithoutExtension()
but incorporates an string index.protected abstract 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.OutputNameStyle
getOutputName, setOutputName
-
Constructor Details
-
IndexableOutputNameStyle
protected IndexableOutputNameStyle()Empty constructor, as needed for deserialization. -
IndexableOutputNameStyle
Creates with an output-name.- Parameters:
outputName
- the output-name.
-
IndexableOutputNameStyle
Copy constructor.- Parameters:
source
- source.
-
-
Method Details
-
filenameWithoutExtension
LikefilenameWithoutExtension()
but incorporates an integer index.- Parameters:
index
- the index, unique within a set of filenames being outputted.- Returns:
- the filename (without an extension, including without the period before the extension).
-
filenameWithoutExtension
LikefilenameWithoutExtension()
but incorporates an string index.- Parameters:
index
- the index- Returns:
- the filename (without an extension, including without the period before the extension).
-
duplicate
Description copied from class:OutputNameStyle
Deep copy the current object.- Specified by:
duplicate
in classOutputNameStyle
- Returns:
- a newly created copy.
-
filenameWithoutExtension
Description copied from class:OutputNameStyle
The filename to be written, including prefix, suffix, etc. but excluding extension (and any period before the extension).- Specified by:
filenameWithoutExtension
in classOutputNameStyle
- Returns:
- the filename (without an extension, including without the period before the extension), if one is defined. If one is not defined, the output is expected to occur without any filename.
-
filenameFromOutputFormatString
Constructs a file name from the output format string and an index.- 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
A format-string as recognized byString.format(java.lang.String, java.lang.Object...)
that expects a single string element.- Returns:
- the format-string.
-