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 Link icon

    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 Link icon

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

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

    Methods inherited from class java.lang.Object Link icon

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

    • maxMeterSize Link icon

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

      long current
    • startTime Link icon

      long startTime
    • total Link icon

      long total
  • Constructor Details Link icon

    • RunMeter Link icon

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

    • printProgress Link icon

      public void printProgress()
    • printProgress Link icon

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