Class NamedFile
Object
NamedFile
A file with an associated unique name.
This is an immutable class.
The name is intended to be a compact unique identifier for a file (in a particular context).
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetFile()The file.Unique identifier associated with the file.getPath()The path ofgetFile().inthashCode()mapIdentifier(BiFunction<String, File, String> function) Immutably renames the file, by assigning it a new identifier.toPath()LikeFile.toPath().toString()
-
Constructor Details
-
NamedFile
-
-
Method Details
-
getPath
-
mapIdentifier
Immutably renames the file, by assigning it a new identifier.- Parameters:
function- generates a new identifier from the existing identifier and file- Returns:
- a newly created file with the assigned identifier, but existing file.
-
toPath
-
getIdentifier
Unique identifier associated with the file. -
getFile
The file. -
equals
-
hashCode
-
toString
-