Package org.aksw.commons.path.core
Class PathWrapperBase<T,F extends Path<T>>
java.lang.Object
org.aksw.commons.path.core.PathWrapperBase<T,F>
- All Implemented Interfaces:
Comparable<Path<T>>,Iterable<Path<T>>,Path<T>
- Direct Known Subclasses:
PathSysBase
Base implementation for custom path wrappers with the main focus on custom values for the 'system' property.
This class implements all methods of
Path and forwards all calls to the delegate.
The result of the operation on the delegate is then passed to the abstract wrap(Path) function which can
then produce an appropriate implementation of the wrapper.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanbooleangetName(int index) intgetRoot()Returns an object such as the file system underlying this path.inthashCode()booleaniterator()relativize(Path<T> other) resolveSibling(Path<T> other) resolveSibling(T other) resolveSiblingStr(String other) resolveStr(String other) booleanstartsWith(Path<T> other) subpath(int beginIndex) Experimental.subpath(int beginIndex, int endIndex) protected abstract Fprotected FwrapOrNull(Path<T> basePath) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
delegate
-
-
Constructor Details
-
PathWrapperBase
-
-
Method Details
-
wrapOrNull
-
wrap
-
unwrap
-
getDelegate
-
iterator
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
toAbsolutePath
- Specified by:
toAbsolutePathin interfacePath<T>
-
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolutein interfacePath<T>
-
getSegments
- Specified by:
getSegmentsin interfacePath<T>
-
getRoot
-
getFileName
- Specified by:
getFileNamein interfacePath<T>
-
getParent
-
getNameCount
public int getNameCount()- Specified by:
getNameCountin interfacePath<T>
-
getName
-
subpath
-
subpath
Description copied from interface:PathExperimental. Not part of nio Path. -
startsWith
- Specified by:
startsWithin interfacePath<T>
-
endsWith
-
normalize
-
resolveStr
- Specified by:
resolveStrin interfacePath<T>
-
resolve
-
resolve
-
resolveSiblingStr
- Specified by:
resolveSiblingStrin interfacePath<T>
-
resolveSibling
- Specified by:
resolveSiblingin interfacePath<T>
-
resolveSibling
- Specified by:
resolveSiblingin interfacePath<T>
-
relativize
- Specified by:
relativizein interfacePath<T>
-
getSystem
Description copied from interface:PathReturns an object such as the file system underlying this path. Returns null if not applicable. Experimental. -
hashCode
public int hashCode() -
equals
-