Class IncomeRegister

java.lang.Object
no.ntnu.idatt1002.demo.data.economics.ItemRegister<Income>
no.ntnu.idatt1002.demo.data.economics.IncomeRegister

public class IncomeRegister extends ItemRegister<Income>
IncomeRegister is a class for storing Income. Subclass of ItemRegister.
Author:
andreas
  • Constructor Details

    • IncomeRegister

      public IncomeRegister()
      Class constructor that creates an empty List for storing Income.
    • IncomeRegister

      public IncomeRegister(List<Income> income)
      Class constructor that takes in a List of Income as argument.
      Parameters:
      income - the List of Income you want to register.
  • Method Details

    • getIncomeByCategory

      public IncomeRegister getIncomeByCategory(IncomeCategory category)
      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

      public IncomeRegister getIncomeByMonth(YearMonth yearMonth)
      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

      public IncomeRegister getRecurringIncome()
      Get the Income that are recurring.
      Returns:
      a new IncomeRegister of recurring Income.