public abstract class BasePath<T extends BasePath<T,FS>,FS extends BaseFileSystem<T>> extends Object implements Path
Modifier and Type | Field and Description |
---|---|
protected ImmutableList<String> |
names |
protected String |
root |
Constructor and Description |
---|
BasePath(FS fileSystem,
String root,
ImmutableList<String> names) |
Modifier and Type | Method and Description |
---|---|
protected String |
asString() |
protected T |
asT() |
protected int |
calculatedHashCode() |
protected T |
checkPath(Path paramPath) |
protected int |
compare(String s1,
String s2) |
int |
compareTo(Path paramPath) |
protected T |
create(String root,
Collection<String> names) |
protected T |
create(String root,
ImmutableList<String> names) |
protected T |
create(String root,
String... names) |
protected boolean |
endsWith(List<?> list,
List<?> other) |
boolean |
endsWith(Path other) |
boolean |
endsWith(String other) |
boolean |
equals(Object obj) |
T |
getFileName() |
FS |
getFileSystem() |
T |
getName(int index) |
int |
getNameCount() |
T |
getParent() |
T |
getRoot() |
int |
hashCode() |
boolean |
isAbsolute() |
protected boolean |
isNormal() |
Iterator<Path> |
iterator() |
T |
normalize() |
WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>... events) |
WatchKey |
register(WatchService watcher,
WatchEvent.Kind<?>[] events,
WatchEvent.Modifier... modifiers) |
T |
relativize(Path other) |
T |
resolve(Path other) |
T |
resolve(String other) |
Path |
resolveSibling(Path other) |
Path |
resolveSibling(String other) |
protected boolean |
startsWith(List<?> list,
List<?> other) |
boolean |
startsWith(Path other) |
boolean |
startsWith(String other) |
T |
subpath(int beginIndex,
int endIndex) |
T |
toAbsolutePath() |
File |
toFile() |
String |
toString() |
URI |
toUri() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toRealPath
forEach, spliterator
protected final String root
protected final ImmutableList<String> names
public BasePath(FS fileSystem, String root, ImmutableList<String> names)
protected T asT()
protected T create(String root, Collection<String> names)
protected T create(String root, ImmutableList<String> names)
public FS getFileSystem()
getFileSystem
in interface Path
public boolean isAbsolute()
isAbsolute
in interface Path
public T getFileName()
getFileName
in interface Path
public int getNameCount()
getNameCount
in interface Path
public boolean startsWith(Path other)
startsWith
in interface Path
public boolean startsWith(String other)
startsWith
in interface Path
protected boolean isNormal()
public Path resolveSibling(Path other)
resolveSibling
in interface Path
public Path resolveSibling(String other)
resolveSibling
in interface Path
public T relativize(Path other)
relativize
in interface Path
public T toAbsolutePath()
toAbsolutePath
in interface Path
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws IOException
register
in interface Path
register
in interface Watchable
IOException
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException
register
in interface Path
register
in interface Watchable
IOException
public int compareTo(Path paramPath)
compareTo
in interface Comparable<Path>
compareTo
in interface Path
public int hashCode()
protected int calculatedHashCode()
public boolean equals(Object obj)
public String toString()
protected String asString()
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.