Class ChainLink<I,​M,​O>

java.lang.Object
com.github.hakenadu.javalangchains.chains.ChainLink<I,​M,​O>
Type Parameters:
I - type of the input chain's input
M - type of the input chain's output and the output chain's input
O - type of the output chain's output
All Implemented Interfaces:
Chain<I,​O>

public final class ChainLink<I,​M,​O>
extends Object
implements Chain<I,​O>
A Link Between Worlds ;-)
  • Method Details

    • run

      public O run​(I input)
      Description copied from interface: Chain
      Execute this Chain
      Specified by:
      run in interface Chain<I,​M>
      Parameters:
      input - this chain's input
      Returns:
      this chain's output
    • isHead

      public boolean isHead()
      Returns:
      true if this ChainLink is the first one of the whole chain
    • isTail

      public boolean isTail()
      Returns:
      true if this ChainLink is the final one of the whole chain
    • getInputChain

      public Chain<I,​M> getInputChain()
      Returns:
      inputChain
    • getOutputChain

      public Chain<M,​O> getOutputChain()
      Returns:
      outputChain