public class DirectoryNode
extends java.lang.Object
| Constructor and Description |
|---|
DirectoryNode(java.lang.String name,
java.io.File absPathToNode,
java.util.ArrayList<DirectoryNode> childNodes,
DirectoryNode parent)
Create a new instance of DirectoryNode.
|
DirectoryNode(java.lang.String name,
java.io.File absPathToNode,
DirectoryNode parent)
Create a new instance of DirectoryNode.
|
DirectoryNode(java.lang.String name,
java.lang.String absPathToNode,
DirectoryNode parent)
Create a new instance of DirectoryNode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(DirectoryNode node)
Append the given node to the list of child nodes.
|
java.util.ArrayList<DirectoryNode> |
getChildren()
Retrieves the list of child nodes.
|
java.io.File |
getFile()
Retrieve the file associated with this node.
|
java.io.File |
getInfoFile() |
java.lang.String |
getName()
Retrieve the name of this node.
|
DirectoryNode |
getParent()
Retrieve the parent node.
|
boolean |
isDir()
Check if this node is a directory.
|
boolean |
removeChild(DirectoryNode node)
Removes the node specified.
|
java.lang.String |
toString() |
public DirectoryNode(java.lang.String name,
java.lang.String absPathToNode,
DirectoryNode parent)
name - Name representing this node.absPathToNode - Absolute path to this node given as a String.parent - The parent node.public DirectoryNode(java.lang.String name,
java.io.File absPathToNode,
DirectoryNode parent)
name - Name representing this node.absPathToNode - Absolute path to this node as a File.parent - The parent node.public DirectoryNode(java.lang.String name,
java.io.File absPathToNode,
java.util.ArrayList<DirectoryNode> childNodes,
DirectoryNode parent)
name - Name representing this node.absPathToNode - Absolute path to this node given as a File.childNodes - List of children nodes.parent - The parent node.public void addChild(DirectoryNode node)
node - Node to be appended.public boolean removeChild(DirectoryNode node)
node - Node to be removed from the list of childrenpublic java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.io.File getFile()
public DirectoryNode getParent()
public java.util.ArrayList<DirectoryNode> getChildren()
public boolean isDir()
public java.io.File getInfoFile()