public abstract class BasePath<T extends BasePath<T,FS>,FS extends BaseFileSystem<T>>
extends java.lang.Object
implements java.nio.file.Path
Modifier and Type | Field and Description |
---|---|
private FS |
fileSystem |
private int |
hashValue |
protected java.util.List<java.lang.String> |
names |
protected java.lang.String |
root |
private java.lang.String |
strValue |
Constructor and Description |
---|
BasePath(FS fileSystem,
java.lang.String root,
java.util.List<java.lang.String> names) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
asString() |
protected T |
asT() |
protected int |
calculatedHashCode() |
protected T |
checkPath(java.nio.file.Path paramPath) |
protected int |
compare(java.lang.String s1,
java.lang.String s2) |
int |
compareTo(java.nio.file.Path paramPath) |
protected T |
create(java.lang.String root,
java.util.Collection<java.lang.String> names) |
protected T |
create(java.lang.String root,
java.util.List<java.lang.String> names) |
protected T |
create(java.lang.String root,
java.lang.String... names) |
protected boolean |
endsWith(java.util.List<?> list,
java.util.List<?> other) |
boolean |
endsWith(java.nio.file.Path other) |
boolean |
endsWith(java.lang.String other) |
boolean |
equals(java.lang.Object obj) |
T |
getFileName() |
FS |
getFileSystem() |
T |
getName(int index) |
int |
getNameCount() |
T |
getParent() |
T |
getRoot() |
int |
hashCode() |
boolean |
isAbsolute() |
protected boolean |
isNormal() |
java.util.Iterator<java.nio.file.Path> |
iterator() |
T |
normalize() |
java.nio.file.WatchKey |
register(java.nio.file.WatchService watcher,
java.nio.file.WatchEvent.Kind<?>... events) |
java.nio.file.WatchKey |
register(java.nio.file.WatchService watcher,
java.nio.file.WatchEvent.Kind<?>[] events,
java.nio.file.WatchEvent.Modifier... modifiers) |
T |
relativize(java.nio.file.Path other) |
T |
resolve(java.nio.file.Path other) |
T |
resolve(java.lang.String other) |
java.nio.file.Path |
resolveSibling(java.nio.file.Path other) |
java.nio.file.Path |
resolveSibling(java.lang.String other) |
protected boolean |
startsWith(java.util.List<?> list,
java.util.List<?> other) |
boolean |
startsWith(java.nio.file.Path other) |
boolean |
startsWith(java.lang.String other) |
T |
subpath(int beginIndex,
int endIndex) |
T |
toAbsolutePath() |
java.io.File |
toFile() |
java.lang.String |
toString() |
java.net.URI |
toUri() |
protected final java.lang.String root
protected final java.util.List<java.lang.String> names
private final FS extends BaseFileSystem<T> fileSystem
private java.lang.String strValue
private int hashValue
public BasePath(FS fileSystem, java.lang.String root, java.util.List<java.lang.String> names)
protected T asT()
protected T create(java.lang.String root, java.lang.String... names)
protected T create(java.lang.String root, java.util.Collection<java.lang.String> names)
protected T create(java.lang.String root, java.util.List<java.lang.String> names)
public FS getFileSystem()
getFileSystem
in interface java.nio.file.Path
public boolean isAbsolute()
isAbsolute
in interface java.nio.file.Path
public T getRoot()
getRoot
in interface java.nio.file.Path
public T getFileName()
getFileName
in interface java.nio.file.Path
public T getParent()
getParent
in interface java.nio.file.Path
public int getNameCount()
getNameCount
in interface java.nio.file.Path
public T getName(int index)
getName
in interface java.nio.file.Path
public T subpath(int beginIndex, int endIndex)
subpath
in interface java.nio.file.Path
protected boolean startsWith(java.util.List<?> list, java.util.List<?> other)
public boolean startsWith(java.nio.file.Path other)
startsWith
in interface java.nio.file.Path
public boolean startsWith(java.lang.String other)
startsWith
in interface java.nio.file.Path
protected boolean endsWith(java.util.List<?> list, java.util.List<?> other)
public boolean endsWith(java.nio.file.Path other)
endsWith
in interface java.nio.file.Path
public boolean endsWith(java.lang.String other)
endsWith
in interface java.nio.file.Path
protected boolean isNormal()
public T normalize()
normalize
in interface java.nio.file.Path
public T resolve(java.nio.file.Path other)
resolve
in interface java.nio.file.Path
public T resolve(java.lang.String other)
resolve
in interface java.nio.file.Path
public java.nio.file.Path resolveSibling(java.nio.file.Path other)
resolveSibling
in interface java.nio.file.Path
public java.nio.file.Path resolveSibling(java.lang.String other)
resolveSibling
in interface java.nio.file.Path
public T relativize(java.nio.file.Path other)
relativize
in interface java.nio.file.Path
public T toAbsolutePath()
toAbsolutePath
in interface java.nio.file.Path
public java.net.URI toUri()
toUri
in interface java.nio.file.Path
public java.io.File toFile()
toFile
in interface java.nio.file.Path
public java.nio.file.WatchKey register(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>... events) throws java.io.IOException
register
in interface java.nio.file.Path
register
in interface java.nio.file.Watchable
java.io.IOException
public java.nio.file.WatchKey register(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>[] events, java.nio.file.WatchEvent.Modifier... modifiers) throws java.io.IOException
register
in interface java.nio.file.Path
register
in interface java.nio.file.Watchable
java.io.IOException
public java.util.Iterator<java.nio.file.Path> iterator()
iterator
in interface java.lang.Iterable<java.nio.file.Path>
iterator
in interface java.nio.file.Path
public int compareTo(java.nio.file.Path paramPath)
compareTo
in interface java.lang.Comparable<java.nio.file.Path>
compareTo
in interface java.nio.file.Path
protected int compare(java.lang.String s1, java.lang.String s2)
protected T checkPath(java.nio.file.Path paramPath)
public int hashCode()
hashCode
in interface java.nio.file.Path
hashCode
in class java.lang.Object
protected int calculatedHashCode()
public boolean equals(java.lang.Object obj)
equals
in interface java.nio.file.Path
equals
in class java.lang.Object
public java.lang.String toString()
toString
in interface java.nio.file.Path
toString
in class java.lang.Object
protected java.lang.String asString()