java.lang.Object
page.codeberg.friedolyn.grades.Subaccount
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aModule
to the end of this subaccount'smodules list
.void
addModules
(@NonNull Module... modules) Adds the specifiedModule
s to the end of this subaccount'smodules list
.void
Removes all modules from this subaccount'smodules list
.boolean
Checks if the fields of this subaccount are equal to their counterparts in the given object (if it is aSubaccount
at all).getCode()
getECTS()
getTitle()
@NonNull Module
removeModule
(int index) Removes the module at the specified position in this subaccount'smodules list
.boolean
removeModule
(@NonNull Module module) Removes the first occurrence of the specifiedModule
from this subaccount'smodules list
, if it is present.removeModules
(int... indices) Removes the modules at the specified positions in this subaccount'smodules list
.boolean
removeModules
(@NonNull Module... modules) Removes the specifiedModules
from this subaccount'smodules list
, if they are present.void
Updates this subaccount'scode
to the given value.void
Updates this subaccount'sects
to the given value.void
Updates this subaccount'stitle
to the given value.@NonNull String
toString()
-
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 themodules
of 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'scode
to 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'stitle
to 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 aModule
to the end of this subaccount'smodules list
.- Parameters:
module
- The module to add.
-
addModules
Adds the specifiedModule
s to the end of this subaccount'smodules list
.- Parameters:
modules
- The modules to add.
-
removeModule
Removes the first occurrence of the specifiedModule
from this subaccount'smodules list
, if it is present.- Parameters:
module
- The module to remove.- Returns:
true
if this list contained the specified element,false
otherwise.
-
removeModules
Removes the specifiedModules
from this subaccount'smodules list
, if they are present.- Parameters:
modules
- The modules to remove.- Returns:
true
if 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 aSubaccount
at all).- Overrides:
equals
in classObject
- Parameters:
object
- The object to compare this subaccount with.- Returns:
true
if the given object is aSubaccount
and all fields are deeply equal,false
otherwise.
-
toString
-