Class AbstractNode

java.lang.Object
it.univr.di.cstnu.graph.AbstractComponent
it.univr.di.cstnu.graph.AbstractNode
All Implemented Interfaces:
Component, Node, Serializable, Comparable<Object>
Direct Known Subclasses:
LabeledNode

public abstract class AbstractNode extends AbstractComponent implements Node
Base class for implementing Node.
Version:
$Rev: 840 $
Author:
posenato
See Also:
  • Constructor Details

    • AbstractNode

      public AbstractNode()
      Minimal constructor.
      See Also:
    • AbstractNode

      AbstractNode(String n)
      Simplified constructor
      Parameters:
      n - name of node
    • AbstractNode

      AbstractNode(Node node)
      Constructor to clone the component.
      Parameters:
      node - the component to clone.
  • Method Details

    • setName

      @Nonnull public String setName(@Nonnull String newName)
      Sets the name of the node.
      Specified by:
      setName in interface Component
      Specified by:
      setName in class AbstractComponent
      Parameters:
      newName - cannot empty. If empty, it does nothing.
      Returns:
      the old name.
    • takeIn

      public void takeIn(Node n)
      Description copied from interface: Node
      A copy by reference of internal structure of node e.
      Specified by:
      takeIn in interface Node
      Parameters:
      n - node to clone. If null, it does nothing.