Class NodeDecorator

java.lang.Object
com.lumiomedical.flow.node.NodeDecorator
All Implemented Interfaces:
Node, Comparable<Node>
Direct Known Subclasses:
OffsetNode

public abstract class NodeDecorator
extends Object
implements Node
Author:
Pierre Lecerf ([email protected]) Created on 2020/12/12
  • Constructor Summary

    Constructors 
    Constructor Description
    NodeDecorator​(Node node)  
  • Method Summary

    Modifier and Type Method Description
    Node after​(Node other)
    Requests for the current node to be executed after the provided node.
    Node after​(Collection<Node> others)
    Requests for the current node to be executed after the provided nodes.
    boolean equals​(Object o)  
    List<Node> getDownstream()
    Returns the list of downstream nodes, ie. nodes which require the current node's output in order to be executed.
    Node getNode()  
    List<Node> getRequiredBy()
    Returns the list of downstream requirements over the current node, ie. nodes which cannot be executed until the current node is.
    List<Node> getRequirements()
    Returns the list of upstream requirement nodes, ie. nodes which need to be executed before, but which outputs aren't required for execution.
    String getUid()
    Returns a unique identifier for the node within a flow DAG.
    List<Node> getUpstream()
    Returns the list of upstream nodes, ie. nodes which output is required in order to execute the current node.
    int hashCode()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.lumiomedical.flow.node.Node

    compareTo
  • Constructor Details

  • Method Details

    • getNode

      public Node getNode()
      Returns:
    • getUid

      public String getUid()
      Description copied from interface: Node
      Returns a unique identifier for the node within a flow DAG.
      Specified by:
      getUid in interface Node
      Returns:
      the node UID
    • getDownstream

      public List<Node> getDownstream()
      Description copied from interface: Node
      Returns the list of downstream nodes, ie. nodes which require the current node's output in order to be executed.
      Specified by:
      getDownstream in interface Node
      Returns:
      the list of downstream nodes
    • getUpstream

      public List<Node> getUpstream()
      Description copied from interface: Node
      Returns the list of upstream nodes, ie. nodes which output is required in order to execute the current node. For Source nodes, this should be empty. For Pipe and Sink nodes, this should be a list of size 1. For Join nodes, this should be a list of size 2.
      Specified by:
      getUpstream in interface Node
      Returns:
      the list of upstream nodes
    • getRequiredBy

      public List<Node> getRequiredBy()
      Description copied from interface: Node
      Returns the list of downstream requirements over the current node, ie. nodes which cannot be executed until the current node is. There can be any number of requirements for a given node.
      Specified by:
      getRequiredBy in interface Node
      Returns:
      the list of downstream requirement nodes
    • getRequirements

      public List<Node> getRequirements()
      Description copied from interface: Node
      Returns the list of upstream requirement nodes, ie. nodes which need to be executed before, but which outputs aren't required for execution. There can be any number of requirements for a given node.
      Specified by:
      getRequirements in interface Node
      Returns:
      the list of upstream requirement nodes
    • after

      public Node after​(Node other)
      Description copied from interface: Node
      Requests for the current node to be executed after the provided node. It should result in the current node having a requirement towards the provided node.
      Specified by:
      after in interface Node
      Parameters:
      other - the node after which it has to be executed
      Returns:
      the current node
      See Also:
      Node.getRequirements()
    • after

      public Node after​(Collection<Node> others)
      Description copied from interface: Node
      Requests for the current node to be executed after the provided nodes. It should result in the current node having a requirement towards each node in the provided collection.
      Specified by:
      after in interface Node
      Parameters:
      others - the nodes after which it has to be executed
      Returns:
      the current node
      See Also:
      Node.getRequirements()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object