Class AlgoEvent

java.lang.Object
inra.ijpb.algo.AlgoEvent

public class AlgoEvent
extends java.lang.Object
An event class for storing information about the status and progression of an algorithm.
Author:
David Legland
  • Constructor Summary

    Constructors
    Constructor Description
    AlgoEvent​(java.lang.Object source, double step, double total)
    Creates a new AlgoEvent.
    AlgoEvent​(java.lang.Object source, java.lang.String status)
    Creates a new AlgoEvent.
    AlgoEvent​(java.lang.Object source, java.lang.String status, double step, double total)
    Creates a new AlgoEvent.
  • Method Summary

    Modifier and Type Method Description
    double getCurrentProgress()  
    double getProgressRatio()  
    java.lang.Object getSource()  
    java.lang.String getStatus()  
    double getTotalProgress()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AlgoEvent

      public AlgoEvent​(java.lang.Object source, java.lang.String status, double step, double total)
      Creates a new AlgoEvent.
      Parameters:
      source - the object generating the event
      status - the status message
      step - the progression step
      total - the total amount of progression step
    • AlgoEvent

      public AlgoEvent​(java.lang.Object source, java.lang.String status)
      Creates a new AlgoEvent.
      Parameters:
      source - the object generating the event
      status - the status message
    • AlgoEvent

      public AlgoEvent​(java.lang.Object source, double step, double total)
      Creates a new AlgoEvent.
      Parameters:
      source - the object generating the event
      step - the progression step
      total - the total amount of progression step
  • Method Details

    • getSource

      public java.lang.Object getSource()
      Returns:
      the source object
    • getStatus

      public java.lang.String getStatus()
      Returns:
      the current status of the algorithm
    • getCurrentProgress

      public double getCurrentProgress()
      Returns:
      the current progression of the algorithm
    • getTotalProgress

      public double getTotalProgress()
      Returns:
      the total progression of the algorithm
    • getProgressRatio

      public double getProgressRatio()
      Returns:
      the progress ratio, as the ratio of current progression over total progression.