public class RepoPath extends Object implements Comparable<RepoPath>
Constructor and Description |
---|
RepoPath(@NotNull List<String> list)
Construct a Repo Path from a List.
|
RepoPath(@NotNull String path)
Construct a Repo Path from a string.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(@NotNull RepoPath o) |
boolean |
equals(Object obj) |
@Nullable RepoPath |
getParent()
Get the parent path of the current path.
|
@NotNull List<String> |
getSegments() |
int |
hashCode() |
boolean |
isRepositoryPath() |
boolean |
startsWith(@Nullable RepoPath otherPath)
Check is this path starts with the other path.
|
String |
toString() |
public RepoPath(@NotNull @NotNull String path)
/my/repo/path
.path
- The string representation of the path. If the initial leading forward
slash is missing it will be assumed to be there.public int compareTo(@NotNull @NotNull RepoPath o)
compareTo
in interface Comparable<RepoPath>
@Nullable public @Nullable RepoPath getParent()
null
if we are at the root and there is no
further parent.public boolean startsWith(@Nullable @Nullable RepoPath otherPath)
otherPath
- The other path to check against.public boolean isRepositoryPath()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.