net.lucidviews.util.io
Class Files.NewFileNameModel
java.lang.Object
net.lucidviews.util.io.Files.NewFileNameModel
- Enclosing class:
- Files
public static class Files.NewFileNameModel
- extends Object
Helper class that creates a new file name based on some rules/configuration.
Method Summary |
String |
getName()
Creates a new file name, modifying the preferred file name slightly (by
adding an index) and incrementing the index each time this method is
called such that each call returns a different file name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_fileName
private String _fileName
_fileIndexSeparator
private String _fileIndexSeparator
_fileIndex
private int _fileIndex
_fileIndexFormat
private NumberFormat _fileIndexFormat
_fileExtn
private String _fileExtn
Files.NewFileNameModel
public Files.NewFileNameModel(String preferredFileName)
- Create a new file-name model ready to construct a new file name.
- Parameters:
preferredFileName
- the preferred name for the new file- Since:
- 1.0
getName
public String getName()
- Creates a new file name, modifying the preferred file name slightly (by
adding an index) and incrementing the index each time this method is
called such that each call returns a different file name.
- Returns:
- a new file name
- Since:
- 1.0