java.lang.Object
page.codeberg.friedolyn.grades.Subaccount
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aModuleto the end of this subaccount'smodules list.voidaddModules(@NonNull Module... modules) Adds the specifiedModules to the end of this subaccount'smodules list.voidRemoves all modules from this subaccount'smodules list.booleanChecks if the fields of this subaccount are equal to their counterparts in the given object (if it is aSubaccountat all).getCode()getECTS()getTitle()@NonNull ModuleremoveModule(int index) Removes the module at the specified position in this subaccount'smodules list.booleanremoveModule(@NonNull Module module) Removes the first occurrence of the specifiedModulefrom this subaccount'smodules list, if it is present.removeModules(int... indices) Removes the modules at the specified positions in this subaccount'smodules list.booleanremoveModules(@NonNull Module... modules) Removes the specifiedModulesfrom this subaccount'smodules list, if they are present.voidUpdates this subaccount'scodeto the given value.voidUpdates this subaccount'sectsto the given value.voidUpdates this subaccount'stitleto the given value.@NonNull StringtoString()
-
Field Details
-
code
-
title
The human-readable name of the account, e.g.Konto A: Wahlpflichtmodule(meaning “Account A: Elective Compulsory Modules”). -
semester
The meaning of this field is not clear, because themodulesof this subaccount have not necessarily taken place in the samesemester. It is likely that this field represents the semester in which the most recent module of this subaccount took place, but this is not formally documented by the Friedolin system. -
ects
-
MODULES
-
-
Constructor Details
-
Subaccount
public Subaccount()
-
-
Method Details
-
getCode
-
getTitle
-
getSemester
- Returns:
- The semester in which the most recent module of this subaccount took place. The meaning of this field is not clear, because the modules of this subaccount have not necessarily taken place in the same semester. It is likely that this field represents the semester in which the most recent module of this subaccount took place, but this is not formally documented by the Friedolin system.
-
getECTS
-
getModules
-
setCode
Updates this subaccount'scodeto the given value.- Parameters:
code- The new subaccount code, which uniquely identifies the account among all accounts of the university. Must not be blank.- Throws:
IllegalArgumentException- If the given code is blank.
-
setTitle
Updates this subaccount'stitleto the given value.- Parameters:
title- The new account title, the human-readable name of the account. Must not be blank.- Throws:
IllegalArgumentException- If the given title is blank.
-
setECTS
-
addModule
Adds aModuleto the end of this subaccount'smodules list.- Parameters:
module- The module to add.
-
addModules
Adds the specifiedModules to the end of this subaccount'smodules list.- Parameters:
modules- The modules to add.
-
removeModule
Removes the first occurrence of the specifiedModulefrom this subaccount'smodules list, if it is present.- Parameters:
module- The module to remove.- Returns:
trueif this list contained the specified element,falseotherwise.
-
removeModules
Removes the specifiedModulesfrom this subaccount'smodules list, if they are present.- Parameters:
modules- The modules to remove.- Returns:
trueif this list was modified as a result of this operation.
-
removeModule
Removes the module at the specified position in this subaccount'smodules list.- Parameters:
index- The index of the module to remove. Must be between 0 (inclusive) and the size of the list (exclusive).- Returns:
- The module previously at the specified position.
- Throws:
IndexOutOfBoundsException- If the index is out of range.
-
removeModules
@NonNull public @NonNull ArrayList<Module> removeModules(int... indices) throws IndexOutOfBoundsException Removes the modules at the specified positions in this subaccount'smodules list.- Parameters:
indices- The indices of the modules to remove. Must be between 0 (inclusive) and the size of the list (exclusive).- Returns:
- The modules previously at the specified positions.
- Throws:
IndexOutOfBoundsException- If any of the indices are out of range.
-
clearModules
public void clearModules()Removes all modules from this subaccount'smodules list. -
equals
Checks if the fields of this subaccount are equal to their counterparts in the given object (if it is aSubaccountat all).- Overrides:
equalsin classObject- Parameters:
object- The object to compare this subaccount with.- Returns:
trueif the given object is aSubaccountand all fields are deeply equal,falseotherwise.
-
toString
-
