Vollständige Java 8 Kompatibilität hinzugefügt.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.file.FileSystem;
|
||||
@@ -7,6 +8,7 @@ import java.nio.file.WatchEvent.Kind;
|
||||
import java.nio.file.WatchEvent.Modifier;
|
||||
import java.nio.file.WatchKey;
|
||||
import java.nio.file.WatchService;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class InMemoryPath implements Path {
|
||||
|
||||
@@ -130,8 +132,9 @@ public class InMemoryPath implements Path {
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = beginIndex + 1; i <= endIndex; i++) { // +1 because parts[0] is empty
|
||||
if (!sb.isEmpty())
|
||||
if (sb.length() != 0) {
|
||||
sb.append("/");
|
||||
}
|
||||
sb.append(parts[i]);
|
||||
}
|
||||
return new InMemoryPath(fileSystem, sb.toString());
|
||||
@@ -172,4 +175,52 @@ public class InMemoryPath implements Path {
|
||||
return path.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startsWith(String other) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'startsWith'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean endsWith(String other) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'endsWith'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path resolve(String other) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'resolve'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path resolveSibling(Path other) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'resolveSibling'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path resolveSibling(String other) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'resolveSibling'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File toFile() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'toFile'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public WatchKey register(WatchService watcher, Kind<?>... events) throws IOException {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'register'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Path> iterator() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'iterator'");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user