java.lang.Object
page.codeberg.friedolyn.grades.Module
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringUniquely identifies the module among all modules of the university, e.g.private ECTSThe number of ECTS credits the module is worth.The exams that are part of the module and that have already been entered into the Friedolin system.private Gradeprivate SemesterWhen the module took place.private Exam.ExamStatusWhether the module is finished and, if so, whether successfully or not.private StringThe human-readable name of the module, e.g. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidgetCode()getECTS()getExams()getGrade()@NonNull Optional<Exam.ExamStatus> getTitle()@NonNull ExamremoveExam(int index) booleanremoveExam(@NonNull Exam exam) removeExams(int... indices) booleanremoveExams(@NonNull Exam... exams) voidvoidUpdates thecodeof the module, which uniquely identifies the module among all modules of the university.voidvoidvoidsetSemester(@NonNull Semester semester) Updates thesemesterin which the module took place.voidsetStatus(Exam.ExamStatus status) Updates thestatusof the module, whether the module is finished and, if so, whether successfully or not.voidUpdates thetitleof the module, the human-readable name of the module.@NonNull StringtoString()@NonNull StringRedacts sensitive information from the string representation of this Module object, by callingRedactable.toStringRedacted()on#gradeand allExamsin theEXAMSlist.
-
Field Details
-
code
Uniquely identifies the module among all modules of the university, e.g.FMI-IN0144for the module “Fortgeschrittenes Programmierpraktikum” (meaning “Advanced Programming Lab”) of the Faculty of Mathematics and Informatics. -
title
The human-readable name of the module, e.g.Fortgeschrittenes Programmierpraktikum(meaning “Advanced Programming Lab”). -
semester
When the module took place. -
grade
-
status
Whether the module is finished and, if so, whether successfully or not. -
ects
-
EXAMS
-
-
Constructor Details
-
Module
public Module()
-
-
Method Details
-
getExams
-
getCode
-
getTitle
-
getSemester
-
getGrade
-
getStatus
- Returns:
- The
statusof the module, whether the module is finished and, if so, whether successfully or not.
-
getECTS
-
setCode
Updates thecodeof the module, which uniquely identifies the module among all modules of the university.- Parameters:
code- The newcodeof the module. Must not be blank.- Throws:
IllegalArgumentException- If the given code is blank.
-
setTitle
Updates thetitleof the module, the human-readable name of the module.- Parameters:
title- The newtitleof the module. Must not be blank.- Throws:
IllegalArgumentException- If the given title is blank.
-
setSemester
-
setGrade
-
setStatus
-
setECTS
-
addExam
-
addExams
-
addExams
-
removeExam
-
removeExams
- Parameters:
exams- The Exams to remove from the module.- Returns:
trueif the list of exams was modified as a result of this operation.- Implementation Note:
- See
ArrayList.removeAll(Collection).
-
removeExam
- Parameters:
index- The index of the Exam to remove from the module. Must be between 0 (inclusive) and the size of the exams list (exclusive).- Throws:
IndexOutOfBoundsException- If the index is out of bounds.
-
removeExams
@NonNull public @NonNull ArrayList<Exam> removeExams(int... indices) throws IndexOutOfBoundsException - Parameters:
indices- The indices of the Exams to remove from the module. Must be between 0 (inclusive) and the size of the exams list (exclusive).- Returns:
- The Exams that were removed from the module.
- Throws:
IndexOutOfBoundsException- If any of the indices are out of bounds.
-
resetExams
-
toString
- Specified by:
toStringin interfaceRedactable- Overrides:
toStringin classObject- Returns:
- A string representation of this Module object.
-
toStringRedacted
Redacts sensitive information from the string representation of this Module object, by callingRedactable.toStringRedacted()on#gradeand allExamsin theEXAMSlist.- Specified by:
toStringRedactedin interfaceRedactable- Returns:
- A redacted string representation of this Module object.
-

