|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.cotta.TPath
public class TPath
An object presentation of path to mainly used by the implemenation of Cotta classes. The methods on TPath has been exposed through TFile and TDirectory
| Method Summary | |
|---|---|
int |
compareTo(TPath that)
Compare two path by comparing each elements. |
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
isChildOf(TPath path)
Check if current path is the child of the given path. |
boolean |
isRelative()
Check is the current path is a relative path or absolute path |
TPath |
join(java.lang.String name)
Join with an pat element to form a new path. |
TPath |
join(TPath path)
Join with another relative path. |
java.lang.String |
lastElementName()
The name of the last element, used by TFile and TDirectory to get the name |
TPath |
parent()
The path of the parent, used by TFile and TDirectory to get the parent |
static TPath |
parse(java.lang.String pathString)
Parses a path string into a TPath object. |
TPath |
pathFrom(TPath path)
Dericve the relative path from the other path, to be used by TFile and TDirectory |
java.lang.String |
toPathString()
|
java.lang.String |
toPathString(PathSeparator pathSeparator)
|
java.lang.String |
toString()
String representation of the path. |
java.lang.String |
toSystemPathString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String lastElementName()
TEntry.name(),
TEntry.name()public TPath parent()
TEntry.parent(),
TEntry.parent()public TPath join(java.lang.String name)
name - The name of the path element to join
TDirectory.file(String),
TDirectory.dir(String)public TPath join(TPath path)
path - The relative path to join
java.lang.IllegalArgumentException - if the path passed in is not a relative pathTDirectory.file(TPath),
TDirectory.dir(TPath)public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjecttoPathString()public static TPath parse(java.lang.String pathString)
pathString - The path string that represents the path
java.lang.IllegalArgumentException - if the path string is nullpublic java.lang.String toPathString()
public java.lang.String toPathString(PathSeparator pathSeparator)
public java.lang.String toSystemPathString()
public boolean isChildOf(TPath path)
path - The path to check to see if current path is its child
TEntry.isChildOf(TDirectory),
TEntry.isChildOf(TDirectory)public boolean isRelative()
public TPath pathFrom(TPath path)
path - The other path to derive relative path from
public int compareTo(TPath that)
compareTo in interface java.lang.Comparable<TPath>that - the other path
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||