Interface IDebt

  • All Known Implementing Classes:
    Debt

    public interface IDebt
    Debt of a citizen to another citizen.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 30, 2014
    • Method Detail

      • getDebitor

        ICitizen getDebitor()
        Retrieve the citizen that is in debt.
        Returns:
        citizen whom the debt is owned.
      • getCreditor

        ICreditor getCreditor()
        Retrieve the citizen that owns the debt.
        Returns:
        citizen who took out the loan.
      • getDueDate

        java.time.LocalDateTime getDueDate()
        Retrieve the date when the debt has to be payed back.
        Returns:
        date when the debt has to be payed back.
      • getLoanedDuration

        long getLoanedDuration​(java.time.LocalDateTime now)
        Retrieve the duration in full days since taking the loan.
        Parameters:
        now - date per which the number of days are to be calculated.
        Returns:
        number of days of the loan untill now
      • getTotalDuration

        long getTotalDuration()
        Retrieve the total duration of the loan in days.
        Returns:
        number of days from start until the due date.
      • getInterest

        double getInterest()
        Interest of the debt over the whole duration.
        Returns:
        interest rate.
      • getAmount

        int getAmount()
        Amount of money indebted without interest.
        Returns:
        loaned amount of money.