Class ProgressInfo

java.lang.Object
edu.cnu.mdi.sim.ProgressInfo

public final class ProgressInfo extends Object
Immutable progress payload for progress updates delivered to SimulationListener.

Supports determinate progress (0..1 fraction) and indeterminate progress (spinner). A message may be provided for UI display.

  • Field Details

    • indeterminate

      public final boolean indeterminate
      True if progress is indeterminate (spinner / "still working").
    • fraction

      public final double fraction
      Determinate progress fraction in the range [0,1]. Ignored if indeterminate is true.
    • message

      public final String message
      Optional UI message such as "Cooling..." or "Loading data...".
  • Method Details

    • indeterminate

      public static ProgressInfo indeterminate(String message)
      Create an indeterminate progress update.
      Parameters:
      message - optional UI text (may be null)
      Returns:
      an indeterminate progress object
    • determinate

      public static ProgressInfo determinate(double fraction, String message)
      Create a determinate progress update.
      Parameters:
      fraction - progress fraction; values are clamped into [0,1]
      message - optional UI text (may be null)
      Returns:
      a determinate progress object
    • toString

      public String toString()
      Overrides:
      toString in class Object