Class RunMeter

java.lang.Object
it.univr.di.cstnu.util.RunMeter

public class RunMeter extends Object
Simple class for making a meter in the console.
Author:
posenato
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) long
     
    (package private) static final int
    A value between 0 and 100
    (package private) long
     
    (package private) long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RunMeter(long inputStartTime, long inputTotal, long inputCurrent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
     
    (package private) void
    printProgress(long givenCurrent)
    Each call of method, advance `this.current` and print the meter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • maxMeterSize

      static final int maxMeterSize
      A value between 0 and 100
      See Also:
    • current

      long current
    • startTime

      long startTime
    • total

      long total
  • Constructor Details

    • RunMeter

      RunMeter(long inputStartTime, long inputTotal, long inputCurrent)
      Parameters:
      inputStartTime - in milliseconds
      inputTotal - number of time to show
      inputCurrent - number of time to show
  • Method Details

    • printProgress

      void printProgress()
    • printProgress

      void printProgress(long givenCurrent)
      Each call of method, advance `this.current` and print the meter.
      Parameters:
      givenCurrent - current meter