Package com.patelheet.capitalengine.api
Record Class Stats
java.lang.Object
java.lang.Record
com.patelheet.capitalengine.api.Stats
- Record Components:
moneySupply- every coin that exists (the Mint's balance, negated)activeMoneySupply-moneySupplyminus balances of players inactive for the dormant periodtreasuryBalance- the Treasury's balanceissuedToday- coins created todaydestroyedToday- coins destroyed todaytreasuryInToday- coins paid into the Treasury todaytreasuryOutToday- coins paid out of the Treasury todayflowsToday- today's flows by source pluginactivePlayersToday- players with at least 5 active (non-AFK) minutes todayactiveMinutesToday- total active minutes todayavgActivePlayers7d- average ofactivePlayersTodayover the last 7 daysdayIndex- current economic dayweekIndex- current economic week
public record Stats(long moneySupply, long activeMoneySupply, long treasuryBalance, long issuedToday, long destroyedToday, long treasuryInToday, long treasuryOutToday, Map<String,PluginFlow> flowsToday, int activePlayersToday, long activeMinutesToday, double avgActivePlayers7d, long dayIndex, long weekIndex)
extends Record
Instant economy-wide snapshot, read from memory.
-
Constructor Summary
ConstructorsConstructorDescriptionStats(long moneySupply, long activeMoneySupply, long treasuryBalance, long issuedToday, long destroyedToday, long treasuryInToday, long treasuryOutToday, Map<String, PluginFlow> flowsToday, int activePlayersToday, long activeMinutesToday, double avgActivePlayers7d, long dayIndex, long weekIndex) Creates an instance of aStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactiveMinutesTodayrecord component.longReturns the value of theactiveMoneySupplyrecord component.intReturns the value of theactivePlayersTodayrecord component.doubleReturns the value of theavgActivePlayers7drecord component.longdayIndex()Returns the value of thedayIndexrecord component.longReturns the value of thedestroyedTodayrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theflowsTodayrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theissuedTodayrecord component.longReturns the value of themoneySupplyrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetreasuryBalancerecord component.longReturns the value of thetreasuryInTodayrecord component.longReturns the value of thetreasuryOutTodayrecord component.longReturns the value of theweekIndexrecord component.
-
Constructor Details
-
Stats
public Stats(long moneySupply, long activeMoneySupply, long treasuryBalance, long issuedToday, long destroyedToday, long treasuryInToday, long treasuryOutToday, Map<String, PluginFlow> flowsToday, int activePlayersToday, long activeMinutesToday, double avgActivePlayers7d, long dayIndex, long weekIndex) Creates an instance of aStatsrecord class.- Parameters:
moneySupply- the value for themoneySupplyrecord componentactiveMoneySupply- the value for theactiveMoneySupplyrecord componenttreasuryBalance- the value for thetreasuryBalancerecord componentissuedToday- the value for theissuedTodayrecord componentdestroyedToday- the value for thedestroyedTodayrecord componenttreasuryInToday- the value for thetreasuryInTodayrecord componenttreasuryOutToday- the value for thetreasuryOutTodayrecord componentflowsToday- the value for theflowsTodayrecord componentactivePlayersToday- the value for theactivePlayersTodayrecord componentactiveMinutesToday- the value for theactiveMinutesTodayrecord componentavgActivePlayers7d- the value for theavgActivePlayers7drecord componentdayIndex- the value for thedayIndexrecord componentweekIndex- the value for theweekIndexrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
moneySupply
public long moneySupply()Returns the value of themoneySupplyrecord component.- Returns:
- the value of the
moneySupplyrecord component
-
activeMoneySupply
public long activeMoneySupply()Returns the value of theactiveMoneySupplyrecord component.- Returns:
- the value of the
activeMoneySupplyrecord component
-
treasuryBalance
public long treasuryBalance()Returns the value of thetreasuryBalancerecord component.- Returns:
- the value of the
treasuryBalancerecord component
-
issuedToday
public long issuedToday()Returns the value of theissuedTodayrecord component.- Returns:
- the value of the
issuedTodayrecord component
-
destroyedToday
public long destroyedToday()Returns the value of thedestroyedTodayrecord component.- Returns:
- the value of the
destroyedTodayrecord component
-
treasuryInToday
public long treasuryInToday()Returns the value of thetreasuryInTodayrecord component.- Returns:
- the value of the
treasuryInTodayrecord component
-
treasuryOutToday
public long treasuryOutToday()Returns the value of thetreasuryOutTodayrecord component.- Returns:
- the value of the
treasuryOutTodayrecord component
-
flowsToday
Returns the value of theflowsTodayrecord component.- Returns:
- the value of the
flowsTodayrecord component
-
activePlayersToday
public int activePlayersToday()Returns the value of theactivePlayersTodayrecord component.- Returns:
- the value of the
activePlayersTodayrecord component
-
activeMinutesToday
public long activeMinutesToday()Returns the value of theactiveMinutesTodayrecord component.- Returns:
- the value of the
activeMinutesTodayrecord component
-
avgActivePlayers7d
public double avgActivePlayers7d()Returns the value of theavgActivePlayers7drecord component.- Returns:
- the value of the
avgActivePlayers7drecord component
-
dayIndex
public long dayIndex()Returns the value of thedayIndexrecord component.- Returns:
- the value of the
dayIndexrecord component
-
weekIndex
public long weekIndex()Returns the value of theweekIndexrecord component.- Returns:
- the value of the
weekIndexrecord component
-