Class IncomeRegister
java.lang.Object
no.ntnu.idatt1002.demo.data.economics.ItemRegister<Income>
no.ntnu.idatt1002.demo.data.economics.IncomeRegister
IncomeRegister is a class for storing Income. Subclass of ItemRegister.
- Author:
- andreas
-
Constructor Summary
ConstructorsConstructorDescriptionClass constructor that creates an empty List for storing Income.IncomeRegister
(List<Income> income) Class constructor that takes in a List of Income as argument. -
Method Summary
Modifier and TypeMethodDescriptiongetIncomeByCategory
(IncomeCategory category) Method for getting every Income in a given IncomeCategory.getIncomeByMonth
(YearMonth yearMonth) Get the Income that are registered with a date corresponding to the given month and year.Get the Income that are recurring.Methods inherited from class no.ntnu.idatt1002.demo.data.economics.ItemRegister
addItem, getItems, getTotalSum, isEmpty, removeItem, toString
-
Constructor Details
-
IncomeRegister
public IncomeRegister()Class constructor that creates an empty List for storing Income. -
IncomeRegister
Class constructor that takes in a List of Income as argument.- Parameters:
income
- the List of Income you want to register.
-
-
Method Details
-
getIncomeByCategory
Method for getting every Income in a given IncomeCategory.- Parameters:
category
- the IncomeCategory you want to get every Income of.- Returns:
- a new IncomeRegister of every Income with category.
-
getIncomeByMonth
Get the Income that are registered with a date corresponding to the given month and year.- Parameters:
yearMonth
- month and year for which to withdraw T's=(Income or Expenses).- Returns:
- list of Income for a certain month and year.
-
getRecurringIncome
Get the Income that are recurring.- Returns:
- a new IncomeRegister of recurring Income.
-