mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
フルパスを返すGetterを追加
This commit is contained in:
parent
0540f775d3
commit
17bf162341
|
@ -1,4 +1,41 @@
|
|||
package one.nem.lacerta.model.document.path;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
public class DocumentPath {
|
||||
|
||||
String rootPath;
|
||||
String path;
|
||||
|
||||
// Getter
|
||||
|
||||
public String getRootPath() {
|
||||
return rootPath;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public Path getFullPath() {
|
||||
// rootPathとpathを結合して返す
|
||||
return Paths.get(rootPath, path);
|
||||
}
|
||||
|
||||
public String getFullPathString() {
|
||||
// rootPathとpathを結合して返す
|
||||
return Paths.get(rootPath, path).toString();
|
||||
}
|
||||
|
||||
// Setter
|
||||
|
||||
public void setRootPath(String rootPath) {
|
||||
this.rootPath = rootPath;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user