Interface PathOps<T, P extends Path<T>>
- All Known Subinterfaces:
PathOpsWrapper<T,P>
- All Known Implementing Classes:
PathOpsJson, PathOpsStr, PathOpsWrapperBase
public interface PathOps<T, P extends Path<T>>
-
Method Summary
Modifier and TypeMethodDescriptiondefault PMethod to create a string from an argument of type T.fromString(String str) Deserialize a string into a pathThe path segment to navigate to the parent, such as '..'To token for a path to refer to itself, such as '.'default PnewAbsolutePath(List<T> segments) default PnewAbsolutePath(T segment) Convenience shorthands forinvalid reference
#newPath(Object)default PnewAbsolutePath(T... segments) Create a new absolute or relative path based on the given segmentsdefault PnewRelativePath(List<T> segments) default PnewRelativePath(T segment) default PnewRelativePath(T... segments) Serialize a path as a stringdefault StringtoStringRaw(Object path)
-
Method Details
-
upcast
-
getBasePathSegments
-
getComparator
Comparator<T> getComparator() -
newPath
-
create
Method to create a string from an argument of type T. In most other cases, this method should return a relative path with the argument as the only segment. However, if T isString(-like) then this method should parse the argument into an appropriate path. Implementations ofPath.resolve(Object)should rely on this method. -
getSelfToken
T getSelfToken()To token for a path to refer to itself, such as '.' -
getParentToken
T getParentToken()The path segment to navigate to the parent, such as '..' -
toString
-
toStringRaw
-
fromString
-
newAbsolutePath
-
newAbsolutePath
-
newAbsolutePath
-
newRelativePath
-
newRelativePath
-
newRelativePath
-