Package org.ec4j.core.model
Class Ec4jPath.Ec4jPaths.NioPath
java.lang.Object
org.ec4j.core.model.Ec4jPath.Ec4jPaths.NioPath
- Enclosing class:
Ec4jPath.Ec4jPaths
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ec4j.core.model.Adaptable
Adaptable.DefaultAdaptableNested classes/interfaces inherited from interface org.ec4j.core.model.Ec4jPath
Ec4jPath.Ec4jPaths -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean<T> TgetAdapter(Class<T> type) Returns this adapted as an object of the giventypeornullif adapting to a giventypeis not possible.inthashCode()booleanrelativize(Ec4jPath other) Constructs a relative path between this path and the givenEc4jPath.toString()
-
Field Details
-
isWindows
private static final boolean isWindows -
path
-
toString
-
-
Constructor Details
-
NioPath
NioPath(Path path)
-
-
Method Details
-
equals
-
getLastSegment
- Specified by:
getLastSegmentin interfaceEc4jPath- Returns:
- the last segment of this
Ec4jPath
-
getParentPath
- Specified by:
getParentPathin interfaceEc4jPath- Returns:
- the parent path of this
Ec4jPathornullof thisEc4jPathhas no parent
-
hashCode
public int hashCode() -
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolutein interfaceEc4jPath- Returns:
trueif thisEc4jPathis absolute (i.e. starting with a slash/or any other implementation specific way) orfalseotherwise
-
relativize
Constructs a relative path between this path and the givenEc4jPath. If thisEc4jPathis/dir1andotheris/dir1/dir2/filethen the relative path isdir2/file.- Specified by:
relativizein interfaceEc4jPath- Parameters:
other- the path to relativize- Returns:
- a relative path between this path and a given path.
-
resolve
-
toString
-
getAdapter
Description copied from interface:AdaptableReturns this adapted as an object of the giventypeornullif adapting to a giventypeis not possible.Can be used to give callers an access to some underlying representation of this, such as
Pathfor aPath-based implementation ofEc4jPath.The set of supported types is implementation specific.
- Specified by:
getAdapterin interfaceAdaptable- Type Parameters:
T- the type to get an adapter for- Parameters:
type- the type of the adapter to lookup- Returns:
- the adapter of the given type or
nullif an adapter for the given type is not available
-