2004.04.29


com.jdc.util
Class Path

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.util.Path

public class Path
extends Object

Path is a helper class used to create a valid path name given two or more input path strings. Note that the SEPARATOR used in this class is really the value returned by System.getProperty("file.separator").

Version:
1.0
Author:
Jay Damon

Field Summary
static String ROOT
          The system root path.
static String SEPARATOR
          The system path separator.
static String UNIX_SEPARATOR
          The UNIX path separator.
static String WINDOWS_SEPARATOR
          The Windows path separator.
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
Path()
          Constructs a new Path object.
 
Method Summary
 String create(String path)
          Create a valid path name.
 String create(String[] paths)
          Create a valid path name from the supplied path strings.
 String create(String path1, String path2)
          Create a valid path name from two input path strings.
 String create(String path1, String path2, String path3)
          Create a valid path name from three input path strings..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT

public static final String ROOT
The system root path.


SEPARATOR

public static final String SEPARATOR
The system path separator.


UNIX_SEPARATOR

public static final String UNIX_SEPARATOR
The UNIX path separator.

See Also:
Constant Field Values

WINDOWS_SEPARATOR

public static final String WINDOWS_SEPARATOR
The Windows path separator.

See Also:
Constant Field Values
Constructor Detail

Path

public Path()
Constructs a new Path object.

Method Detail

create

public String create(String path)
Create a valid path name.

Returns:
String Valid path name.

create

public String create(String path1,
                     String path2)
Create a valid path name from two input path strings.

Returns:
String Valid concatenated path name.

create

public String create(String path1,
                     String path2,
                     String path3)
Create a valid path name from three input path strings..

Returns:
String Valid concatenated path name.

create

public String create(String[] paths)
Create a valid path name from the supplied path strings.

Returns:
String Valid concatenated path name.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.