Class AbstractEntry

java.lang.Object
org.codehaus.mojo.mrm.api.AbstractEntry
All Implemented Interfaces:
Entry
Direct Known Subclasses:
BaseFileEntry, DefaultDirectoryEntry

public abstract class AbstractEntry extends Object implements Entry
Abstract implementation of Entry.
Since:
1.0
  • Constructor Details

    • AbstractEntry

      protected AbstractEntry(FileSystem fileSystem, DirectoryEntry parent, String name)
      Creates an entry in the specified file system with the specified parent and name.
      Parameters:
      fileSystem - The filesystem.
      parent - The parent.
      name - The name of the entry.
      Since:
      1.0
  • Method Details

    • getFileSystem

      public FileSystem getFileSystem()
      Description copied from interface: Entry
      Returns the repository that this entry belongs to.
      Specified by:
      getFileSystem in interface Entry
      Returns:
      the repository that this entry belongs to.
    • getParent

      public DirectoryEntry getParent()
      Description copied from interface: Entry
      Returns the parent of this entry (or null if there is no parent, that is the root entry).
      Specified by:
      getParent in interface Entry
      Returns:
      the parent of this entry (or null if there is no parent, that is the root entry).
    • getName

      public String getName()
      Description copied from interface: Entry
      Returns the name of this entry.
      Specified by:
      getName in interface Entry
      Returns:
      the name of this entry.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toPath

      public final String toPath()
      Description copied from interface: Entry
      Returns the path of this entry relative to the root of the filesystem. Must not start with a '/'.
      Specified by:
      toPath in interface Entry
      Returns:
      the path of this entry relative to the root of the filesystem.