Class FileHandleImpl.MutableFileHandleImpl

  • All Implemented Interfaces:
    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.SizeProperty
    Enclosing class:
    FileHandleImpl


    public class FileHandleImpl.MutableFileHandleImpl
    extends FileHandleImpl
    implements FileHandle.MutableFileHandle
    The implementation of a 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.
    • Constructor Detail

      • MutableFileHandleImpl

        public MutableFileHandleImpl​(String aPath,
                                     String aName,
                                     long aSize,
                                     Date aCreatedDate,
                                     Date aModifiedDate)
        Instantiates a new mutable file handle impl.
        Parameters:
        aPath - the path
        aName - the name
        aSize - the size
        aCreatedDate - the created date
        aModifiedDate - the modified date
      • MutableFileHandleImpl

        public MutableFileHandleImpl​(FileHandle aFileHandle)
        Instantiates a new mutable file handle impl.
        Parameters:
        aFileHandle - the file handle
    • Method Detail

      • setModifiedDate

        public void setModifiedDate​(Date aModifiedDate)
        Specified by:
        setModifiedDate in interface org.refcodes.mixin.ModifiedDateAccessor.ModifiedDateMutator
      • setSize

        public void setSize​(long aSize)
        Specified by:
        setSize in interface org.refcodes.mixin.SizeAccessor.SizeMutator
      • setName

        public void setName​(String aName)
        Specified by:
        setName in interface org.refcodes.mixin.NameAccessor.NameMutator
      • setPath

        public void setPath​(String aPath)
        Specified by:
        setPath in interface org.refcodes.mixin.PathAccessor.PathMutator
      • setCreatedDate

        public void setCreatedDate​(Date aCreatedDate)
        Specified by:
        setCreatedDate in interface org.refcodes.mixin.CreatedDateAccessor.CreatedDateMutator