Package edu.cnu.mdi.sim
Class ProgressInfo
java.lang.Object
edu.cnu.mdi.sim.ProgressInfo
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 Summary
FieldsModifier and TypeFieldDescriptionfinal doubleDeterminate progress fraction in the range [0,1].final booleanTrue if progress is indeterminate (spinner / "still working").final StringOptional UI message such as "Cooling..." or "Loading data...". -
Method Summary
Modifier and TypeMethodDescriptionstatic ProgressInfodeterminate(double fraction, String message) Create a determinate progress update.static ProgressInfoindeterminate(String message) Create an indeterminate progress update.toString()
-
Field Details
-
indeterminate
public final boolean indeterminateTrue if progress is indeterminate (spinner / "still working"). -
fraction
public final double fractionDeterminate progress fraction in the range [0,1]. Ignored ifindeterminateis true. -
message
Optional UI message such as "Cooling..." or "Loading data...".
-
-
Method Details
-
indeterminate
Create an indeterminate progress update.- Parameters:
message- optional UI text (may be null)- Returns:
- an indeterminate progress object
-
determinate
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
-