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 long
getLoanedDuration(java.time.LocalDateTime now)
Retrieve the duration in full days since taking the loan.long
getTotalDuration()
Retrieve the total duration of the loan in days.java.lang.String
toString()
-
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:IDebt
Retrieve the duration in full days since taking the loan.- Specified by:
getLoanedDuration
in 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:IDebt
Retrieve the total duration of the loan in days.- Specified by:
getTotalDuration
in interfaceIDebt
- Returns:
- number of days from start until the due date.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-