FileHandle, FileHandle.MutableFileHandle, org.refcodes.mixin.CreatedDateAccessor, org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutator, org.refcodes.mixin.CreatedDateAccessor.CreatedDateProperty, org.refcodes.mixin.ModifiedDateAccessor, org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutator, org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateProperty, org.refcodes.mixin.NameAccessor, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty, org.refcodes.mixin.PathAccessor, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathProperty, org.refcodes.mixin.SizeAccessor, org.refcodes.mixin.SizeAccessor.SizeMutator, org.refcodes.mixin.SizeAccessor.SizePropertypublic class FileHandleImpl.MutableFileHandleImpl extends FileHandleImpl implements FileHandle.MutableFileHandle
FileHandle.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 FileHandle.MutableFileHandle in a
collection.org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutator, org.refcodes.mixin.CreatedDateAccessor.CreatedDatePropertyFileHandle.MutableFileHandleFileHandleImpl.MutableFileHandleImplorg.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutator, org.refcodes.mixin.ModifiedDateAccessor.ModifiedDatePropertyorg.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty_createdDate, _modifiedDate, _name, _path, _size| Constructor | Description |
|---|---|
MutableFileHandleImpl(String aPath,
String aName,
long aSize,
Date aCreatedDate,
Date aModifiedDate) |
Instantiates a new mutable file handle impl.
|
MutableFileHandleImpl(FileHandle aFileHandle) |
Instantiates a new mutable file handle impl.
|
| Modifier and Type | Method | 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, toMutableFileHandlegetCreatedDate, 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.