Package net.sourceforge.jnlp.cache
Class DirectoryNode
java.lang.Object
net.sourceforge.jnlp.cache.DirectoryNode
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryNode
(String name, File absPathToNode, ArrayList<DirectoryNode> childNodes, DirectoryNode parent) Create a new instance of DirectoryNode.DirectoryNode
(String name, File absPathToNode, DirectoryNode parent) Create a new instance of DirectoryNode.DirectoryNode
(String name, String absPathToNode, DirectoryNode parent) Create a new instance of DirectoryNode. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(DirectoryNode node) Append the given node to the list of child nodes.Retrieves the list of child nodes.getFile()
Retrieve the file associated with this node.getName()
Retrieve the name of this node.Retrieve the parent node.boolean
isDir()
Check if this node is a directory.boolean
removeChild
(DirectoryNode node) Removes the node specified.toString()
-
Constructor Details
-
DirectoryNode
Create a new instance of DirectoryNode.- Parameters:
name
- Name representing this node.absPathToNode
- Absolute path to this node given as a String.parent
- The parent node.
-
DirectoryNode
Create a new instance of DirectoryNode.- Parameters:
name
- Name representing this node.absPathToNode
- Absolute path to this node as a File.parent
- The parent node.
-
DirectoryNode
public DirectoryNode(String name, File absPathToNode, ArrayList<DirectoryNode> childNodes, DirectoryNode parent) Create a new instance of DirectoryNode.- Parameters:
name
- Name representing this node.absPathToNode
- Absolute path to this node given as a File.childNodes
- List of children nodes.parent
- The parent node.
-
-
Method Details
-
addChild
Append the given node to the list of child nodes.- Parameters:
node
- Node to be appended.
-
removeChild
Removes the node specified.- Parameters:
node
- Node to be removed from the list of children- Returns:
- true if this list of children contained the specified element
-
getName
Retrieve the name of this node.- Returns:
- Name of this node.
-
toString
-
getFile
Retrieve the file associated with this node.- Returns:
- File that is associated with this node.
-
getParent
Retrieve the parent node.- Returns:
- DirectoryNode representing the parent of the current node.
-
getChildren
Retrieves the list of child nodes.- Returns:
- ArrayList of type DirectoryNode containing all the child nodes.
-
isDir
public boolean isDir()Check if this node is a directory.- Returns:
- True if node is directory.
-
getInfoFile
-