Modifier and Type | Field and Description |
---|---|
private Asset |
asset
The asset this node holds.
|
private java.util.Set<Node> |
children
The children nodes.
|
private ArchivePath |
path
The path of this node inside the
Archive |
Constructor and Description |
---|
NodeImpl(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.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Node node)
Adds a child to the Set of nodes.
|
boolean |
equals(java.lang.Object obj) |
Asset |
getAsset() |
java.util.Set<Node> |
getChildren() |
ArchivePath |
getPath() |
int |
hashCode() |
void |
removeChild(Node node)
Removes a child from the Set of nodes.
|
java.lang.String |
toString() |
private ArchivePath path
Archive
private Asset asset
private java.util.Set<Node> children
public NodeImpl(ArchivePath path)
path
- The ArchivePath
this Node is placed within the Archive
public NodeImpl(ArchivePath path, Asset asset)
path
- The ArchivePath
this Node is placed within the Archive
asset
- The Asset
that this Node holds.public ArchivePath getPath()
public Asset getAsset()
public java.util.Set<Node> getChildren()
getChildren
in interface Node
public void addChild(Node node)
node
- The Node that will be added as a childpublic void removeChild(Node node)
node
- The Node that will be removed from the childspublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object