Class CompletionThreshold
java.lang.Object
dev.jcputney.elearning.parser.input.scorm2004.adl.cp.CompletionThreshold
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionDefault constructor for the CompletionThreshold class.CompletionThreshold(MeasureType minProgressMeasure, PercentType progressWeight, Boolean completedByMeasure) Constructs a `CompletionThreshold` object with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the value indicating whether completion is determined by the measure.Retrieves the minimum progress measure for the completion threshold.Retrieves the progress weight associated with the completion threshold.inthashCode()voidsetCompletedByMeasure(Boolean completedByMeasure) Sets the value indicating whether completion is determined by the measure.voidsetMinProgressMeasure(MeasureType minProgressMeasure) Sets the minimum progress measure for the completion threshold.voidsetProgressWeight(PercentType progressWeight) Sets the progress weight for the completion threshold.
-
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 aMeasureTypeinstance.progressWeight- the progress weight, represented as aPercentType. This value is a percentage between 0 and 1 inclusive.completedByMeasure- aBooleanvalue indicating whether the completion is determined by the measure. Set totrueif completion is based on the measure, otherwisefalse.
-
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
Retrieves the minimum progress measure for the completion threshold.- Returns:
- the minimum progress measure as a
MeasureTypeinstance.
-
setMinProgressMeasure
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 aMeasureType
-
getProgressWeight
Retrieves the progress weight associated with the completion threshold.- Returns:
- the progress weight as a
PercentTypeinstance, representing a percentage value between 0 and 1 inclusive.
-
setProgressWeight
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 aPercentType. Must be a value between 0 and 1; otherwise, an exception will be thrown.
-
getCompletedByMeasure
Retrieves the value indicating whether completion is determined by the measure.- Returns:
- a
Booleanvalue representing whether completion is based on the measure; returnstrueif completion is determined by the measure, otherwisefalse.
-
setCompletedByMeasure
Sets the value indicating whether completion is determined by the measure.- Parameters:
completedByMeasure- aBooleanvalue that specifies whether completion is based on the measure. Passtrueif completion should depend on the measure, otherwisefalse.
-
equals
-
hashCode
public int hashCode()
-