nl.toolforge.karma.core.cmd.util
Class DependencyPath

java.lang.Object
  extended bynl.toolforge.karma.core.cmd.util.DependencyPath

public class DependencyPath
extends java.lang.Object

Represents the path to a dependency. Consists of two parts, a relative part and the part that forms the prefix of this relative part. Together they form the absolute path to the dependency.

Author:
W.H. Schraal

Constructor Summary
(package private) DependencyPath(java.io.File pathPrefix, java.io.File relativePath)
          Create a new DependencyPath
 
Method Summary
static java.lang.String concat(java.util.Set dependencyPaths, boolean relative, char separator)
          Concatenates all DependencyPaths in the given set to a separated String.
 boolean exists()
          Does the dependency exist?
 java.io.File getFullPath()
          Retrieve the full absolute path to the dependency by concatenating the prefix and the relative path.
 java.io.File getPathPrefix()
           
 java.io.File getRelativePath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyPath

DependencyPath(java.io.File pathPrefix,
               java.io.File relativePath)
Create a new DependencyPath

Parameters:
pathPrefix - Prefix for the dependency path.
relativePath - Relative path to the dependency.
Method Detail

getPathPrefix

public java.io.File getPathPrefix()

getRelativePath

public java.io.File getRelativePath()

getFullPath

public java.io.File getFullPath()
Retrieve the full absolute path to the dependency by concatenating the prefix and the relative path.

Returns:
The full path to the dependency.

exists

public boolean exists()
Does the dependency exist?

Returns:
Whether or not the dependency exists.

concat

public static java.lang.String concat(java.util.Set dependencyPaths,
                                      boolean relative,
                                      char separator)
Concatenates all DependencyPaths in the given set to a separated String.

Parameters:
dependencyPaths - Set of DependencyPath Objects.
relative - Use relative paths?
separator - Separator char to use.
Returns:
Separated String.


Copyright © 2002-2004 Toolforge. All Rights Reserved.