public class Path extends Object implements Comparable
| 构造器和说明 |
|---|
Path(Path parent,
Path child)
Resolve a child path against a parent path.
|
Path(Path parent,
String child)
Resolve a child path against a parent path.
|
Path(String pathString)
Construct a path from a String.
|
Path(String parent,
Path child)
Resolve a child path against a parent path.
|
Path(String parent,
String child)
Resolve a child path against a parent path.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(Object o) |
int |
depth()
Return the number of elements in this path.
|
boolean |
equals(Object o) |
String |
getName()
Returns the final component of this path.
|
Path |
getParent()
Returns the parent of a path or null if at root.
|
int |
hashCode() |
boolean |
isAbsolute() |
boolean |
isRoot() |
Path |
suffix(String suffix)
Adds a suffix to the final name in the path.
|
String |
toString() |
public Path(String pathString) throws IllegalArgumentException
public int depth()
public boolean isAbsolute()
public boolean isRoot()
public String getName()
public Path getParent()
public int compareTo(Object o)
compareTo 在接口中 ComparableCopyright © 2015 Alibaba Cloud Computing. All rights reserved.