public class DirectoryTreeNodeData extends MTBTreeNodeData
MTBTreeNodeData
for the tree sub-class
DirectoryTree
.
In particular, each node of the tree is associated with an absolute path and a list of file names. These data are stored inside objects of this class which are attached to nodes of the tree.
MTBTreeNodeData
Modifier and Type | Field and Description |
---|---|
(package private) Vector<String> |
files
List of files (no subdirectories!)
|
(package private) String |
path
Absolute directory path associated with this node.
|
Constructor and Description |
---|
DirectoryTreeNodeData(String p)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(String f)
Adds a file to the list of the node.
|
DirectoryTreeNodeData |
clone() |
Vector<String> |
getFileList()
Get the list of all files inside the directory.
|
String |
getPath()
Request path associated with the node.
|
Vector<String> |
getSubtreeDirList()
Collects the list of all sub-directories of this directory.
|
Vector<String> |
getSubtreeFileList()
Collects the list of all files inside this directory and also
inside all subdirectories.
|
void |
printData()
Method to print the data associated with the node.
|
void |
setPath(String p)
Specify path associated with the node.
|
getNode, setNode
String path
public DirectoryTreeNodeData(String p)
p
- absolute path of directorypublic DirectoryTreeNodeData clone()
clone
in class MTBTreeNodeData
public String getPath()
public void setPath(String p)
p
- path of the node's directorypublic void addFile(String f)
f
- file to be addedpublic Vector<String> getFileList()
public void printData()
MTBTreeNodeData
printData
in class MTBTreeNodeData
public Vector<String> getSubtreeFileList()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.