Record Class Stats
java.lang.Object
java.lang.Record
com.truebubo.maniflow.stats.Stats
- Record Components:
ownsMoney
- Money currently owned not tied in assetsownsStocks
- How much of each currency is ownedowesMoney
- Money owned via debts
public record Stats(Map<CurrencyDesignation, BigDecimal> ownsMoney, Map<String, BigDecimal> ownsStocks, Map<CurrencyDesignation, BigDecimal> owesMoney)
extends Record
Class to represent stats
-
Constructor Summary
ConstructorsConstructorDescriptionStats
(Map<CurrencyDesignation, BigDecimal> ownsMoney, Map<String, BigDecimal> ownsStocks, Map<CurrencyDesignation, BigDecimal> owesMoney) Creates an instance of aStats
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theowesMoney
record component.Returns the value of theownsMoney
record component.Returns the value of theownsStocks
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Stats
public Stats(Map<CurrencyDesignation, BigDecimal> ownsMoney, Map<String, BigDecimal> ownsStocks, Map<CurrencyDesignation, BigDecimal> owesMoney) Creates an instance of aStats
record class.- Parameters:
ownsMoney
- the value for theownsMoney
record componentownsStocks
- the value for theownsStocks
record componentowesMoney
- the value for theowesMoney
record 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)
. -
ownsMoney
-
ownsStocks
Returns the value of theownsStocks
record component.- Returns:
- the value of the
ownsStocks
record component
-
owesMoney
-