Class Debt
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.impl.Debt
-
-
Constructor Summary
Constructors Constructor Description Debt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLoanedDuration(java.time.LocalDateTime now)Retrieve the duration in full days since taking the loan.longgetTotalDuration()Retrieve the total duration of the loan in days.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.city.impl.IDebt
getAmount, getCreditor, getDebitor, getDueDate, getInterest
-
-
-
-
Method Detail
-
getLoanedDuration
public long getLoanedDuration(java.time.LocalDateTime now)
Description copied from interface:IDebtRetrieve the duration in full days since taking the loan.- Specified by:
getLoanedDurationin interfaceIDebt- Parameters:
now- date per which the number of days are to be calculated.- Returns:
- number of days of the loan untill
now
-
getTotalDuration
public long getTotalDuration()
Description copied from interface:IDebtRetrieve the total duration of the loan in days.- Specified by:
getTotalDurationin interfaceIDebt- Returns:
- number of days from start until the due date.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-