Class PointAdder

  • All Implemented Interfaces:
    Runnable

    public class PointAdder
    extends Object
    implements Runnable
    Class used to add points periodically to the end of the output.
    • Constructor Detail

      • PointAdder

        public PointAdder​(ConsoleApplication app)
        Default constructor.
        Parameters:
        app - The console application to be used. Creates a PointAdder that writes to the standard output with the default period time.
    • Method Detail

      • start

        public void start()
        Starts the PointAdder: points are added at the end of the logs periodically.
      • stop

        public void stop()
        Stops the PointAdder: points are no longer added at the end of the logs periodically.

        Calling this method on a PointAdder that was never started is a no-op: callers commonly create the PointAdder before the code path that starts it and stop it from a finally block.

      • run

        public void run()
        Specified by:
        run in interface Runnable