Class LoanerState

  • All Implemented Interfaces:
    ILoaner

    public class LoanerState
    extends java.lang.Object
    implements ILoaner
    Author:
    Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 30, 2014
    • Field Detail

      • city

        private final ICity city
      • debts

        private java.util.List<IDebt> debts
      • loanProposals

        private java.util.List<ILoanProposal> loanProposals
      • date

        @Autowired
        private Date date
    • Constructor Detail

      • LoanerState

        public LoanerState​(ICity city)
    • Method Detail

      • add

        public void add​(LoanProposal proposal)
        Description copied from interface: ILoaner
        Add a loan proposal.
        Specified by:
        add in interface ILoaner
        Parameters:
        proposal - to be added
      • add

        public void add​(LoanRequest request)
        Description copied from interface: ILoaner
        Add a loan request.
        Specified by:
        add in interface ILoaner
        Parameters:
        request - to be added
      • clearOldRequests

        public void clearOldRequests()
        Description copied from interface: ILoaner
        Remove request that are older than a certain time span.
        Specified by:
        clearOldRequests in interface ILoaner
      • addDebt

        public void addDebt​(IDebt debt)
        Description copied from interface: ILoaner
        Add a new debt to the list.
        Specified by:
        addDebt in interface ILoaner
        Parameters:
        debt - to be added