org.fuin.kickstart4j
Class MkDir

java.lang.Object
  extended by org.fuin.kickstart4j.MkDir
All Implemented Interfaces:
org.fuin.utils4j.ToDebugStringCapable

public final class MkDir
extends java.lang.Object
implements org.fuin.utils4j.ToDebugStringCapable

A directory inside a base directory. This class is immutable.


Constructor Summary
MkDir(java.io.File baseDir, java.io.File dir)
          Constructor with base directory and directory.
MkDir(java.lang.String path)
          Constructor with all arguments.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.lang.String getCanonicalPath(java.io.File baseDir)
          Returns the absolute directory based on a given base directory as String.
 java.io.File getDestDir(java.io.File baseDir)
          Returns the absolute file based on a given base directory.
 java.lang.String getPath()
          Returns the path of the file.
 java.lang.String getSlashPath()
          Returns the path with a slash ("/") used as separator.
 int hashCode()
          
 java.lang.String toDebugString()
          
 java.lang.String toString()
          
 java.lang.String toXML()
          Creates an XML representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MkDir

public MkDir(java.io.File baseDir,
             java.io.File dir)
Constructor with base directory and directory.

Parameters:
baseDir - Base directory for calculating the relative path.
dir - Directory inside the base directory.

MkDir

public MkDir(java.lang.String path)
Constructor with all arguments.

Parameters:
path - Path relative to the base directory.
Method Detail

getPath

public final java.lang.String getPath()
Returns the path of the file.

Returns:
Path relative to the base directory.

getCanonicalPath

public final java.lang.String getCanonicalPath(java.io.File baseDir)
Returns the absolute directory based on a given base directory as String.

Parameters:
baseDir - Base directory.
Returns:
Path inside the base directory.

getDestDir

public final java.io.File getDestDir(java.io.File baseDir)
Returns the absolute file based on a given base directory.

Parameters:
baseDir - Base directory.
Returns:
File inside the base directory.

getSlashPath

public final java.lang.String getSlashPath()
Returns the path with a slash ("/") used as separator.

Returns:
Path.

toXML

public final java.lang.String toXML()
Creates an XML representation of the object.

Returns:
XML for element "mkdir"

hashCode

public final int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public final boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

toDebugString

public final java.lang.String toDebugString()

Specified by:
toDebugString in interface org.fuin.utils4j.ToDebugStringCapable

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2010 Future Invent Informationsmanagement GmbH. All Rights Reserved.