Record Class Currency
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.economy.Currency
public record Currency(net.kyori.adventure.key.Key id, net.kyori.adventure.text.Component name, net.kyori.adventure.text.Component pluralName, net.kyori.adventure.text.Component symbol, int fractionalDigits, boolean isPrefix, BigDecimal minBalance, BigDecimal maxBalance)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCurrency(net.kyori.adventure.key.Key id, net.kyori.adventure.text.Component name, net.kyori.adventure.text.Component pluralName, net.kyori.adventure.text.Component symbol, int fractionalDigits, boolean isPrefix, BigDecimal minBalance, BigDecimal maxBalance) Creates an instance of aCurrencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.kyori.adventure.text.Componentformat(BigDecimal amount) net.kyori.adventure.text.ComponentformatName(BigDecimal amount) formatValue(BigDecimal amount) intReturns the value of thefractionalDigitsrecord component.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.key.Keyid()Returns the value of theidrecord component.booleanisPrefix()Returns the value of theisPrefixrecord component.Returns the value of themaxBalancerecord component.Returns the value of theminBalancerecord component.net.kyori.adventure.text.Componentname()Returns the value of thenamerecord component.net.kyori.adventure.text.ComponentReturns the value of thepluralNamerecord component.net.kyori.adventure.text.Componentsymbol()Returns the value of thesymbolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Currency
public Currency(net.kyori.adventure.key.Key id, net.kyori.adventure.text.Component name, net.kyori.adventure.text.Component pluralName, net.kyori.adventure.text.Component symbol, int fractionalDigits, boolean isPrefix, BigDecimal minBalance, BigDecimal maxBalance) Creates an instance of aCurrencyrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentpluralName- the value for thepluralNamerecord componentsymbol- the value for thesymbolrecord componentfractionalDigits- the value for thefractionalDigitsrecord componentisPrefix- the value for theisPrefixrecord componentminBalance- the value for theminBalancerecord componentmaxBalance- the value for themaxBalancerecord component
-
-
Method Details
-
formatValue
-
format
-
formatName
-
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. -
id
public net.kyori.adventure.key.Key id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
public net.kyori.adventure.text.Component name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
pluralName
public net.kyori.adventure.text.Component pluralName()Returns the value of thepluralNamerecord component.- Returns:
- the value of the
pluralNamerecord component
-
symbol
public net.kyori.adventure.text.Component symbol()Returns the value of thesymbolrecord component.- Returns:
- the value of the
symbolrecord component
-
fractionalDigits
public int fractionalDigits()Returns the value of thefractionalDigitsrecord component.- Returns:
- the value of the
fractionalDigitsrecord component
-
isPrefix
public boolean isPrefix()Returns the value of theisPrefixrecord component.- Returns:
- the value of the
isPrefixrecord component
-
minBalance
Returns the value of theminBalancerecord component.- Returns:
- the value of the
minBalancerecord component
-
maxBalance
Returns the value of themaxBalancerecord component.- Returns:
- the value of the
maxBalancerecord component
-