Package org.jboss.shrinkwrap.impl.base
Class NodeImpl
java.lang.Object
org.jboss.shrinkwrap.impl.base.NodeImpl
- All Implemented Interfaces:
Node
The default implementation of
Node
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodeImpl
(ArchivePath path) Constructor This constructor will create a directory Node with the specified path.NodeImpl
(ArchivePath path, Asset asset) Constructor This constructor will create an asset Node with the specified path. -
Method Summary
-
Field Details
-
path
The path of this node inside theArchive
-
asset
The asset this node holds. -
children
The children nodes.
-
-
Constructor Details
-
NodeImpl
Constructor This constructor will create a directory Node with the specified path.- Parameters:
path
- TheArchivePath
this Node is placed within theArchive
-
NodeImpl
Constructor This constructor will create an asset Node with the specified path.- Parameters:
path
- TheArchivePath
this Node is placed within theArchive
asset
- TheAsset
that this Node holds.
-
-
Method Details
-
getPath
-
getAsset
-
getChildren
- Specified by:
getChildren
in interfaceNode
- Returns:
- The child nodes of this node or, an empty set if it has no children or holds an asset. This method will never return null. The returned Set will be an immutable view.
-
addChild
Adds a child to the Set of nodes. If already exists, nothing happens.- Parameters:
node
- The Node that will be added as a child
-
removeChild
Removes a child from the Set of nodes. If it doesn't exists, nothing happens.- Parameters:
node
- The Node that will be removed from the childs
-
equals
-
hashCode
public int hashCode() -
toString
-