Record Class TransactionLimits.LimitProfile
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.economy.capability.TransactionLimits.LimitProfile
- Enclosing interface:
TransactionLimits
public static record TransactionLimits.LimitProfile(Account account, Currency currency, TransactionLimits.LimitAction action, BigDecimal maxAmount, Duration period, BigDecimal currentUsage, Instant periodStart, boolean isCustomLimit)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionLimitProfile(Account account, Currency currency, TransactionLimits.LimitAction action, BigDecimal maxAmount, Duration period, BigDecimal currentUsage, Instant periodStart, boolean isCustomLimit) Creates an instance of aLimitProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccount()Returns the value of theaccountrecord component.action()Returns the value of theactionrecord component.currency()Returns the value of thecurrencyrecord component.Returns the value of thecurrentUsagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCustomLimitrecord component.Returns the value of themaxAmountrecord component.period()Returns the value of theperiodrecord component.Returns the value of theperiodStartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LimitProfile
public LimitProfile(Account account, Currency currency, TransactionLimits.LimitAction action, BigDecimal maxAmount, Duration period, BigDecimal currentUsage, Instant periodStart, boolean isCustomLimit) Creates an instance of aLimitProfilerecord class.- Parameters:
account- the value for theaccountrecord componentcurrency- the value for thecurrencyrecord componentaction- the value for theactionrecord componentmaxAmount- the value for themaxAmountrecord componentperiod- the value for theperiodrecord componentcurrentUsage- the value for thecurrentUsagerecord componentperiodStart- the value for theperiodStartrecord componentisCustomLimit- the value for theisCustomLimitrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
account
Returns the value of theaccountrecord component.- Returns:
- the value of the
accountrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
maxAmount
Returns the value of themaxAmountrecord component.- Returns:
- the value of the
maxAmountrecord component
-
period
Returns the value of theperiodrecord component.- Returns:
- the value of the
periodrecord component
-
currentUsage
Returns the value of thecurrentUsagerecord component.- Returns:
- the value of the
currentUsagerecord component
-
periodStart
Returns the value of theperiodStartrecord component.- Returns:
- the value of the
periodStartrecord component
-
isCustomLimit
public boolean isCustomLimit()Returns the value of theisCustomLimitrecord component.- Returns:
- the value of the
isCustomLimitrecord component
-