Record Class LoanService.Loan
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.economy.capability.LoanService.Loan
- Enclosing interface:
LoanService
public static record LoanService.Loan(UUID id, Account borrower, Account lender, Currency currency, BigDecimal principal, BigDecimal remainingBalance, BigDecimal interestRate, Instant issueDate, Instant nextPaymentDue, Instant termEnd, EconomyContext context, LoanService.LoanState state)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionLoan(UUID id, Account borrower, Account lender, Currency currency, BigDecimal principal, BigDecimal remainingBalance, BigDecimal interestRate, Instant issueDate, Instant nextPaymentDue, Instant termEnd, EconomyContext context, LoanService.LoanState state) Creates an instance of aLoanrecord class. -
Method Summary
Modifier and TypeMethodDescriptionborrower()Returns the value of theborrowerrecord component.context()Returns the value of thecontextrecord component.currency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinterestRaterecord component.Returns the value of theissueDaterecord component.lender()Returns the value of thelenderrecord component.Returns the value of thenextPaymentDuerecord component.Returns the value of theprincipalrecord component.Returns the value of theremainingBalancerecord component.state()Returns the value of thestaterecord component.termEnd()Returns the value of thetermEndrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Loan
public Loan(UUID id, Account borrower, Account lender, Currency currency, BigDecimal principal, BigDecimal remainingBalance, BigDecimal interestRate, Instant issueDate, Instant nextPaymentDue, Instant termEnd, EconomyContext context, LoanService.LoanState state) Creates an instance of aLoanrecord class.- Parameters:
id- the value for theidrecord componentborrower- the value for theborrowerrecord componentlender- the value for thelenderrecord componentcurrency- the value for thecurrencyrecord componentprincipal- the value for theprincipalrecord componentremainingBalance- the value for theremainingBalancerecord componentinterestRate- the value for theinterestRaterecord componentissueDate- the value for theissueDaterecord componentnextPaymentDue- the value for thenextPaymentDuerecord componenttermEnd- the value for thetermEndrecord componentcontext- the value for thecontextrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
borrower
Returns the value of theborrowerrecord component.- Returns:
- the value of the
borrowerrecord component
-
lender
Returns the value of thelenderrecord component.- Returns:
- the value of the
lenderrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
principal
Returns the value of theprincipalrecord component.- Returns:
- the value of the
principalrecord component
-
remainingBalance
Returns the value of theremainingBalancerecord component.- Returns:
- the value of the
remainingBalancerecord component
-
interestRate
Returns the value of theinterestRaterecord component.- Returns:
- the value of the
interestRaterecord component
-
issueDate
Returns the value of theissueDaterecord component.- Returns:
- the value of the
issueDaterecord component
-
nextPaymentDue
Returns the value of thenextPaymentDuerecord component.- Returns:
- the value of the
nextPaymentDuerecord component
-
termEnd
Returns the value of thetermEndrecord component.- Returns:
- the value of the
termEndrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-