public class Path extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_SEPARATOR
The path separator.
|
| Constructor and Description |
|---|
Path()
Constructor for an empty path.
|
Path(String path) |
| Modifier and Type | Method and Description |
|---|---|
Path |
addId(String id)
Create a new path by adding a new path element identified by they id to
this path.
|
Path |
addPath(Path extra)
Create a new path by adding a path to this path.
|
boolean |
equals(Object obj) |
Path |
getChildPath()
Get the path below the topmost element.
|
String |
getId() |
Path |
getParent() |
String |
getRoot()
Get the id of the top element in the path.
|
int |
hashCode() |
Path |
relativeTo(Path other)
Resolve the other path relative to this path.
|
int |
size()
Return the size or depth of this path.
|
String |
toString() |
public static final String PATH_SEPARATOR
public Path()
public Path(String path)
public int size()
public String getRoot()
public String getId()
public Path getChildPath()
public Path addId(String id)
id - The id of the new path element. May be null.public Path getParent()
public Path addPath(Path extra)
extra - The extra path.public Path relativeTo(Path other)
other - The other path.Copyright © 2023. All rights reserved.