public class FileHandleImpl.MutableFileHandleImpl extends FileHandleImpl implements FileHandle.MutableFileHandle
MutableFileHandle.
-------------------------------------------------------------------------
CAUTION: fiddling with the path and the name attributes causes the
hashCode() and equals(Object) methods to change
behavior which can cause problems especially in collections!
-------------------------------------------------------------------------
ATTENTION: In order to avoid the above mentioned problems with the
equals(Object) and hashCode() methods, use
toFileHandle() before storing a MutableFileHandle in a
collection.FileHandleImpl.MutableFileHandleImplFileHandle.MutableFileHandleorg.refcodes.mixin.PathAccessor.PathBuilder<B extends org.refcodes.mixin.PathAccessor.PathBuilder<?>>, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathPropertyorg.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NamePropertyorg.refcodes.mixin.SizeAccessor.SizeMutator, org.refcodes.mixin.SizeAccessor.SizeProperty_createdDate, _modifiedDate, _name, _path, _size| Constructor and Description |
|---|
MutableFileHandleImpl(FileHandle aFileHandle)
Instantiates a new mutable file handle impl.
|
MutableFileHandleImpl(String aPath,
String aName,
long aSize,
Date aCreatedDate,
Date aModifiedDate)
Instantiates a new mutable file handle impl.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
setCreatedDate(Date aCreatedDate) |
void |
setModifiedDate(Date aModifiedDate) |
void |
setName(String aName) |
void |
setPath(String aPath) |
void |
setSize(long aSize) |
FileHandle |
toFileHandle()
Converts the
FileHandle.MutableFileHandle back to a FileHandle
to avoid hassle with collections, the Object.hashCode() and
the Object.equals(Object) operations. |
getCreatedDate, getModifiedDate, getName, getPath, getSize, toKey, toMutableFileHandleclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCreatedDate, getModifiedDate, getName, getPath, getSize, toKey, toMutableFileHandlepublic MutableFileHandleImpl(String aPath, String aName, long aSize, Date aCreatedDate, Date aModifiedDate)
aPath - the pathaName - the nameaSize - the sizeaCreatedDate - the created dateaModifiedDate - the modified datepublic MutableFileHandleImpl(FileHandle aFileHandle)
aFileHandle - the file handlepublic void setModifiedDate(Date aModifiedDate)
setModifiedDate in interface org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutatorpublic void setSize(long aSize)
setSize in interface org.refcodes.mixin.SizeAccessor.SizeMutatorpublic void setName(String aName)
setName in interface org.refcodes.mixin.NameAccessor.NameMutatorpublic void setPath(String aPath)
setPath in interface org.refcodes.mixin.PathAccessor.PathMutatorpublic void setCreatedDate(Date aCreatedDate)
setCreatedDate in interface org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutatorpublic int hashCode()
hashCode in class FileHandleImplpublic boolean equals(Object obj)
equals in class FileHandleImplpublic FileHandle toFileHandle()
FileHandle.MutableFileHandle back to a FileHandle
to avoid hassle with collections, the Object.hashCode() and
the Object.equals(Object) operations.toFileHandle in interface FileHandle.MutableFileHandleFileHandle from this
FileHandle.MutableFileHandle.Copyright © 2018. All rights reserved.