mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
効率化
This commit is contained in:
parent
04651f3b8e
commit
171c8b380c
|
@ -21,18 +21,22 @@ public class PublicPath {
|
||||||
this.path.add(path);
|
this.path.add(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PublicPath resolve(String path) {
|
private void resolveInternal(String path) {
|
||||||
if (path.equals("..")) {
|
if (path.equals("..")) {
|
||||||
this.path.remove(this.path.size() - 1);
|
this.path.remove(this.path.size() - 1);
|
||||||
} else {
|
} else {
|
||||||
add(path);
|
add(path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public PublicPath resolve(String path) {
|
||||||
|
resolveInternal(path);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PublicPath resolve(List<String> path) {
|
public PublicPath resolve(List<String> path) {
|
||||||
for (String p : path) {
|
for (String p : path) {
|
||||||
resolve(p);
|
resolveInternal(p);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user