Class IMapNode

Direct Known Subclasses:
Element, IMapNodeComposite

public abstract class IMapNode
extends IPublisher
Composite design pattern unit. Cannot have any children. Can have multiple IMapNodeComposite parents.
  • Field Details

  • Constructor Details

    • IMapNode

      public IMapNode​(String nodeName)
  • Method Details

    • getParents

      public Set<IMapNodeComposite> getParents()
    • setParents

      public void setParents​(Set<IMapNodeComposite> parents)
    • getNodeName

      public String getNodeName()
    • setNodeName

      public void setNodeName​(String nodeName)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addParent

      public void addParent​(IMapNodeComposite parent)
      Adds a parent to the node.
      Parameters:
      parent - Node to add as parent.
    • removeParent

      public void removeParent​(IMapNodeComposite parent)
      Removes a parent from the node.
      Parameters:
      parent - Node to remove from parents.
    • receive

      public void receive​(Object message)
      Description copied from class: IObserver
      Receive data update from publisher. Default implementation, should be overridden.
      Overrides:
      receive in class IObserver
      Parameters:
      message - Data sent by publisher.