|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.issue.attachment.Path
public class Path
Copied from FECRU
./java/com/cenqua/fisheye/Path.java r54145
Constructor Summary | |
---|---|
Path()
|
|
Path(CharSequence path)
|
|
Path(CharSequence path,
boolean allowSloshes)
|
|
Path(List<String> start)
|
|
Path(Path path)
|
|
Path(Path aParent,
Path aPath)
|
|
Path(Path aParent,
String aPath)
|
|
Path(Path aParent,
String aPath,
boolean allowSloshes)
|
|
Path(String aParent,
Path aPath)
|
Method Summary | |
---|---|
Path |
abbreviate(int maxLength)
abbreviate a path by removing path components from the middle until the length of the path (as via .getPath()) is not greater then maxLength. |
Path[] |
abbreviatePathComponents(int maxLength)
Returns a similar result to getPathComponents() , but abbreviates the result (inserts null at the break
point) |
int |
compareTo(Path o)
|
boolean |
equals(Object o)
|
Path |
getCommonRoot(Path other)
|
String |
getComponent(int i)
|
String[] |
getComponents()
|
String |
getExtension()
|
String |
getName()
|
int |
getNumComponents()
|
Path |
getParent()
|
String |
getPath()
|
String |
getPath(boolean caseSensitive)
|
Path[] |
getPathComponents()
|
Path |
getPathHead()
|
Path |
getRelativePath(Path aStartPath)
returns a path relative to aStartPath. |
Path |
getRelativePath(Path aStartPath,
boolean caseSensitive)
|
Path |
getStripTail(Path other)
if other is an exact tail of this, return the path leading up to that tail otherwise return null |
Path |
getSubPath(int depth)
|
String |
getTail()
|
Path |
getTailPath()
|
int |
hashCode()
|
boolean |
hasPrefix(Path p)
determines if this path begins with all of p |
boolean |
hasPrefix(Path p,
boolean caseSensitive)
|
boolean |
isAbove()
Indicates this path points to a locatio above the notional root. |
boolean |
isAncestor(Path descendant)
|
boolean |
isRoot()
|
static String |
join(String a,
String b)
Intelligently Put a "/" between two strings. |
Path |
normalize()
|
int |
numComponents()
|
static String |
parseDir(String p)
|
static String |
parseName(String p)
|
Path |
simplify()
|
static String[] |
split(CharSequence aPath)
|
static String[] |
split(CharSequence aPath,
boolean allowSloshes)
|
void |
toLowerCase()
|
String |
toString()
|
Path |
trimFirst()
|
Path |
trimFirst(int n)
|
Path |
trimLast()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Path()
public Path(CharSequence path)
public Path(CharSequence path, boolean allowSloshes)
public Path(Path path)
public Path(Path aParent, String aPath)
public Path(Path aParent, Path aPath)
public Path(Path aParent, String aPath, boolean allowSloshes)
public Path(String aParent, Path aPath)
public Path(List<String> start)
Method Detail |
---|
public Path getParent()
public String getPath()
public String[] getComponents()
public Path[] getPathComponents()
public boolean isAncestor(Path descendant)
public Path getCommonRoot(Path other)
public Path getStripTail(Path other)
public Path getRelativePath(Path aStartPath)
TODO revisit this method, it's meaning and where it is used
public Path getRelativePath(Path aStartPath, boolean caseSensitive)
public String getName()
public String toString()
toString
in class Object
public Path simplify()
public boolean isAbove()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static String join(String a, String b)
public static String[] split(CharSequence aPath)
public static String[] split(CharSequence aPath, boolean allowSloshes)
public boolean isRoot()
public Path trimFirst()
public Path trimFirst(int n)
n
- number of components to trimpublic Path trimLast()
public String getComponent(int i)
public int numComponents()
public int getNumComponents()
public int compareTo(Path o)
compareTo
in interface Comparable<Path>
public static String parseName(String p)
public static String parseDir(String p)
public Path abbreviate(int maxLength)
The first and last path component are always in the returned path.
If any path components were removed, an ellippses "..." will appear in the middle
The returned path may in some cases still be greater.
public Path[] abbreviatePathComponents(int maxLength)
getPathComponents()
, but abbreviates the result (inserts null at the break
point)
public boolean hasPrefix(Path p)
p
public boolean hasPrefix(Path p, boolean caseSensitive)
public Path normalize()
public String getPath(boolean caseSensitive)
public void toLowerCase()
public Path getSubPath(int depth)
public Path getPathHead()
public String getTail()
public Path getTailPath()
public String getExtension()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |