Class IndexableOutputNameStyle
Object
org.anchoranalysis.io.output.namestyle.OutputNameStyle
org.anchoranalysis.io.output.namestyle.IndexableOutputNameStyle
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IntegerSuffixOutputNameStyle,StringSuffixOutputNameStyle
public abstract class IndexableOutputNameStyle extends OutputNameStyle
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:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protectedIndexableOutputNameStyle()Empty constructor, as needed for deserialization.protectedIndexableOutputNameStyle(String outputName)Creates with an output-name.protectedIndexableOutputNameStyle(IndexableOutputNameStyle source)Copy constructor. -
Method Summary
Modifier and Type Method Description abstract IndexableOutputNameStyleduplicate()Deep copy the current object.protected abstract StringfilenameFromOutputFormatString(String outputFormatString, String index)Constructs a file name from the output format string and an index.Optional<String>filenameWithoutExtension()The filename to be written, including prefix, suffix, etc.StringfilenameWithoutExtension(int index)LikefilenameWithoutExtension()but incorporates an integer index.StringfilenameWithoutExtension(String index)LikefilenameWithoutExtension()but incorporates an string index.protected abstract 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.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:OutputNameStyleDeep copy the current object.- Specified by:
duplicatein classOutputNameStyle- Returns:
- a newly created copy.
-
filenameWithoutExtension
Description copied from class:OutputNameStyleThe filename to be written, including prefix, suffix, etc. but excluding extension (and any period before the extension).- Specified by:
filenameWithoutExtensionin 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:
index- the index, unique within a set of filenames being outputted.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.- 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.
-