Class Processor<T>

  • Type Parameters:
    T - the type of processor
    All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Runnable

    public abstract class Processor<T>
    extends java.lang.Object
    implements java.lang.Runnable, java.lang.AutoCloseable
    Abstract class to create, in general, an input stream processor used to evaluate the output of an external process.
    Author:
    Jeremy Long
    • Constructor Summary

      Constructors 
      Constructor Description
      Processor()
      Creates a new processor.
      Processor​(T input)
      Creates a new processor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addSuppressedExceptions​(java.lang.Throwable ex, java.lang.Throwable... suppress)
      Adds any non-null exceptions in the `suppress` list to the suppressed exceptions on the main exception `ex`.
      protected T getInput()
      Retrieves a reference to the input.
      void setInput​(T input)
      Sets the input to process.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.AutoCloseable

        close
      • Methods inherited from interface java.lang.Runnable

        run
    • Constructor Detail

      • Processor

        public Processor()
        Creates a new processor.
      • Processor

        public Processor​(T input)
        Creates a new processor.
        Parameters:
        input - the input to process
    • Method Detail

      • setInput

        public void setInput​(T input)
        Sets the input to process.
        Parameters:
        input - the input to process
      • getInput

        protected T getInput()
        Retrieves a reference to the input.
        Returns:
        a reference to the input
      • addSuppressedExceptions

        protected void addSuppressedExceptions​(java.lang.Throwable ex,
                                               java.lang.Throwable... suppress)
        Adds any non-null exceptions in the `suppress` list to the suppressed exceptions on the main exception `ex`.
        Parameters:
        ex - the main exception that suppressed exceptions will be added
        suppress - one or more exceptions that will be added as suppressed