org.codehaus.mojo.mrm.api
Class AbstractEntry

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

public abstract class AbstractEntry
extends Object
implements Entry

Abstract implementation of Entry.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
protected AbstractEntry(FileSystem fileSystem, DirectoryEntry parent, String name)
          Creates an entry in the specified file system with the specified parent and name.
 
Method Summary
 boolean equals(Object o)
          
 FileSystem getFileSystem()
          Returns the repository that this entry belongs to.
 String getName()
          Returns the name of this entry.
 DirectoryEntry getParent()
          Returns the parent of this entry (or null if there is no parent, that is the root entry).
 int hashCode()
          
 String toPath()
          Returns the path of this entry relative to the root of the filesystem.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.mojo.mrm.api.Entry
getLastModified
 

Constructor Detail

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 Detail

getFileSystem

public FileSystem getFileSystem()
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()
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()
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()
Returns the path of this entry relative to the root of the filesystem.

Specified by:
toPath in interface Entry
Returns:
the path of this entry relative to the root of the filesystem.


Copyright © 2009-2011 Codehaus. All Rights Reserved.