Interface ILoaner

  • All Known Implementing Classes:
    LoanerState

    public interface ILoaner
    Representing the loaner in a city. The loaner gets weekly updates with new loan requests from citizens. He also holds the list of all depts.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 30, 2014
    • Method Detail

      • getDebts

        java.util.List<IDebt> getDebts()
        Retrieve the list of all debts for this city.
        Returns:
        list of debts of the loaner
      • getLoanProposals

        java.util.List<ILoanProposal> getLoanProposals()
        Retrieve the loans that can be taken.
        Returns:
        list of loan proposals of the loaner
      • addDebt

        void addDebt​(IDebt debt)
        Add a new debt to the list.
        Parameters:
        debt - to be added
      • getRequests

        java.util.List<ILoanRequest> getRequests()
        List of requested loans.
        Returns:
        list of loan requests of the loaner
      • getCity

        ICity getCity()
        Retrieve the city the loaner belongs to.
        Returns:
        city where the loaner resides.
      • clearOldRequests

        void clearOldRequests()
        Remove request that are older than a certain time span.
      • add

        void add​(LoanProposal proposal)
        Add a loan proposal.
        Parameters:
        proposal - to be added
      • add

        void add​(LoanRequest request)
        Add a loan request.
        Parameters:
        request - to be added