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.Pathpublic boolean isAbsolute()
isAbsolute in interface java.nio.file.Pathpublic T getRoot()
getRoot in interface java.nio.file.Pathpublic T getFileName()
getFileName in interface java.nio.file.Pathpublic T getParent()
getParent in interface java.nio.file.Pathpublic int getNameCount()
getNameCount in interface java.nio.file.Pathpublic T getName(int index)
getName in interface java.nio.file.Pathpublic T subpath(int beginIndex, int endIndex)
subpath in interface java.nio.file.Pathprotected boolean startsWith(java.util.List<?> list,
java.util.List<?> other)
public boolean startsWith(java.nio.file.Path other)
startsWith in interface java.nio.file.Pathpublic boolean startsWith(java.lang.String other)
startsWith in interface java.nio.file.Pathprotected boolean endsWith(java.util.List<?> list,
java.util.List<?> other)
public boolean endsWith(java.nio.file.Path other)
endsWith in interface java.nio.file.Pathpublic boolean endsWith(java.lang.String other)
endsWith in interface java.nio.file.Pathprotected boolean isNormal()
public T normalize()
normalize in interface java.nio.file.Pathpublic T resolve(java.nio.file.Path other)
resolve in interface java.nio.file.Pathpublic T resolve(java.lang.String other)
resolve in interface java.nio.file.Pathpublic java.nio.file.Path resolveSibling(java.nio.file.Path other)
resolveSibling in interface java.nio.file.Pathpublic java.nio.file.Path resolveSibling(java.lang.String other)
resolveSibling in interface java.nio.file.Pathpublic T relativize(java.nio.file.Path other)
relativize in interface java.nio.file.Pathpublic T toAbsolutePath()
toAbsolutePath in interface java.nio.file.Pathpublic java.net.URI toUri()
toUri in interface java.nio.file.Pathpublic java.io.File toFile()
toFile in interface java.nio.file.Pathpublic 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.Pathregister in interface java.nio.file.Watchablejava.io.IOExceptionpublic 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.Pathregister in interface java.nio.file.Watchablejava.io.IOExceptionpublic java.util.Iterator<java.nio.file.Path> iterator()
iterator in interface java.lang.Iterable<java.nio.file.Path>iterator in interface java.nio.file.Pathpublic int compareTo(java.nio.file.Path paramPath)
compareTo in interface java.lang.Comparable<java.nio.file.Path>compareTo in interface java.nio.file.Pathprotected 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.PathhashCode in class java.lang.Objectprotected int calculatedHashCode()
public boolean equals(java.lang.Object obj)
equals in interface java.nio.file.Pathequals in class java.lang.Objectpublic java.lang.String toString()
toString in interface java.nio.file.PathtoString in class java.lang.Objectprotected java.lang.String asString()