Class CompletionThreshold

java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.adl.cp.CompletionThreshold
All Implemented Interfaces:
Serializable

public final class CompletionThreshold extends Object implements Serializable
Represents the completion threshold element, which specifies the minimum progress required to mark the content as complete. Includes attributes for progress weight and a boolean indicating if completion is by measure.
See Also:
  • Constructor Details

    • CompletionThreshold

      public CompletionThreshold(MeasureType minProgressMeasure, PercentType progressWeight, Boolean completedByMeasure)
      Constructs a `CompletionThreshold` object with the specified parameters.
      Parameters:
      minProgressMeasure - the minimum progress measure for the completion threshold, represented as a MeasureType instance.
      progressWeight - the progress weight, represented as a PercentType. This value is a percentage between 0 and 1 inclusive.
      completedByMeasure - a Boolean value indicating whether the completion is determined by the measure. Set to true if completion is based on the measure, otherwise false.
    • CompletionThreshold

      public CompletionThreshold()
      Default constructor for the CompletionThreshold class.

      This no-argument constructor initializes a default instance of the CompletionThreshold class without setting any fields or performing any specific operations. It serves as a placeholder for creating CompletionThreshold objects.

  • Method Details

    • getMinProgressMeasure

      public MeasureType getMinProgressMeasure()
      Retrieves the minimum progress measure for the completion threshold.
      Returns:
      the minimum progress measure as a MeasureType instance.
    • setMinProgressMeasure

      public void setMinProgressMeasure(MeasureType minProgressMeasure)
      Sets the minimum progress measure for the completion threshold. If the provided measure is null, the method does nothing.
      Parameters:
      minProgressMeasure - the minimum progress measure to be set, represented as a MeasureType
    • getProgressWeight

      public PercentType getProgressWeight()
      Retrieves the progress weight associated with the completion threshold.
      Returns:
      the progress weight as a PercentType instance, representing a percentage value between 0 and 1 inclusive.
    • setProgressWeight

      public void setProgressWeight(PercentType progressWeight)
      Sets the progress weight for the completion threshold. The progress weight is represented as a percentage value between 0 and 1, inclusive.
      Parameters:
      progressWeight - the progress weight to be assigned, represented as a PercentType. Must be a value between 0 and 1; otherwise, an exception will be thrown.
    • getCompletedByMeasure

      public Boolean getCompletedByMeasure()
      Retrieves the value indicating whether completion is determined by the measure.
      Returns:
      a Boolean value representing whether completion is based on the measure; returns true if completion is determined by the measure, otherwise false.
    • setCompletedByMeasure

      public void setCompletedByMeasure(Boolean completedByMeasure)
      Sets the value indicating whether completion is determined by the measure.
      Parameters:
      completedByMeasure - a Boolean value that specifies whether completion is based on the measure. Pass true if completion should depend on the measure, otherwise false.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object