⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 catalogueitem.java

📁 NAS文件器的模拟
💻 JAVA
字号:
package fileSystem;

public class CatalogueItem {
	private INode iNode;
	private CatalogueItem tail = null;
	
	public CatalogueItem(int i){	
		if (VirtualData.isDir(i)){
			iNode = new DirINode(i);
		}
		else {
			iNode = new FileINode(i);
		}
	}
	
	public CatalogueItem(int i , String otherName){			
		if (VirtualData.isDir(i)){
			iNode = new DirINode(i, otherName);
		}
		else {
			iNode = new FileINode(i, otherName);
		}
	}
	
	public CatalogueItem addCatalogueItem (int i) {
		this.do_addCatalogueItem(i);
		return this;
	}
	
	private void do_addCatalogueItem(int i){
		if(this.tail == null) {
			this.tail = new CatalogueItem(i);
		}
		else {
			this.tail.do_addCatalogueItem(i);
		}
	}
	
	public CatalogueItem addCatalogueItem (int i, String otherName) {
		this.do_addCatalogueItem(i, otherName);
		return this;
	}
	
	private void do_addCatalogueItem(int i, String otherName){
		if(this.tail == null) {
			this.tail = new CatalogueItem(i, otherName);
		}
		else {
			this.tail.do_addCatalogueItem(i, otherName);
		}
	}
	
	public CatalogueItem getTail() {
		return tail;
	}
	
	public String getName () {
		return iNode.name;
	}
	
	public String getCreatTime(){
		return iNode.time_creat;
	}
	
	public String getAccessTime(){
		return iNode.time_access;
	}
	
	public String getIsDir(){
		return iNode.isDir;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -