Class NodeImpl

java.lang.Object
org.jboss.shrinkwrap.impl.base.NodeImpl
All Implemented Interfaces:
Node

public class NodeImpl extends Object implements Node
The default implementation of Node
Author:
German Escobar
  • Constructor Details

    • NodeImpl

      public NodeImpl(ArchivePath path)
      Constructor

      This constructor will create a directory Node with the specified path.

      Parameters:
      path - The ArchivePath this Node is placed within the Archive
    • NodeImpl

      public NodeImpl(ArchivePath path, Asset asset)
      Constructor

      This constructor will create an asset Node with the specified path.

      Parameters:
      path - The ArchivePath this Node is placed within the Archive
      asset - The Asset that this Node holds.
  • Method Details

    • getPath

      public ArchivePath getPath()
      Specified by:
      getPath in interface Node
    • getAsset

      public Asset getAsset()
      Specified by:
      getAsset in interface Node
    • getChildren

      public Set<Node> getChildren()
      Specified by:
      getChildren in interface Node
    • addChild

      public void addChild(Node node)
      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

      public void removeChild(Node node)
      Removes a child from the Set of nodes. If it doesn't exist, nothing happens.
      Parameters:
      node - The Node that will be removed from the children
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object