public class BalanceData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.math.BigDecimal |
defaultValue
Default amount of this balance, what new players and new banks
get
|
protected java.lang.String |
format
DecimalFormat used for formatting
|
protected java.lang.String |
fullName
The whole name of this balance type
|
protected java.lang.String |
name
Name of the balance type
|
protected java.lang.String |
prefix
Text written before amount
|
protected java.lang.String |
prefixPlural
Text written before amount, if amount is plural
|
protected java.lang.String |
suffix
Text written after amount, if amount
|
protected java.lang.String |
suffixPlural
Text written after amount, if amount is plural
|
protected boolean |
useKMBT
Use K (10^3), M (10^6), B (10^9), T (10^12) suffixes instead of
the whole balance amount
|
Constructor and Description |
---|
BalanceData(BalanceData bd)
Constructs a new BalanceData, by copying all
the properties of the given BalanceData
|
BalanceData(java.lang.String name)
Constructs a new BalanceData, sets it's name and full name
to the balance type represented by this BalanceData
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.math.BigDecimal amount)
Formats the given amount of balance
|
java.lang.String |
getPrefixPlural()
|
java.lang.String |
getSuffixPlural()
|
protected java.math.BigDecimal defaultValue
protected java.lang.String format
protected java.lang.String fullName
protected java.lang.String name
protected java.lang.String prefix
protected java.lang.String prefixPlural
protected java.lang.String suffix
protected java.lang.String suffixPlural
protected boolean useKMBT
public BalanceData(java.lang.String name)
name
- - The balance type represented by this BalanceDatapublic BalanceData(BalanceData bd)
bd
- - The BalanceData which having the copyable propertiespublic java.lang.String format(java.math.BigDecimal amount)
amount
- - The balance amountpublic java.lang.String getPrefixPlural()
public java.lang.String getSuffixPlural()