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 - moneySupply minus balances of players inactive for the dormant period
treasuryBalance - the Treasury's balance
issuedToday - coins created today
destroyedToday - coins destroyed today
treasuryInToday - coins paid into the Treasury today
treasuryOutToday - coins paid out of the Treasury today
flowsToday - today's flows by source plugin
activePlayersToday - players with at least 5 active (non-AFK) minutes today
activeMinutesToday - total active minutes today
avgActivePlayers7d - average of activePlayersToday over the last 7 days
dayIndex - current economic day
weekIndex - 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 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 a Stats record class.
      Parameters:
      moneySupply - the value for the moneySupply record component
      activeMoneySupply - the value for the activeMoneySupply record component
      treasuryBalance - the value for the treasuryBalance record component
      issuedToday - the value for the issuedToday record component
      destroyedToday - the value for the destroyedToday record component
      treasuryInToday - the value for the treasuryInToday record component
      treasuryOutToday - the value for the treasuryOutToday record component
      flowsToday - the value for the flowsToday record component
      activePlayersToday - the value for the activePlayersToday record component
      activeMinutesToday - the value for the activeMinutesToday record component
      avgActivePlayers7d - the value for the avgActivePlayers7d record component
      dayIndex - the value for the dayIndex record component
      weekIndex - the value for the weekIndex record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • moneySupply

      public long moneySupply()
      Returns the value of the moneySupply record component.
      Returns:
      the value of the moneySupply record component
    • activeMoneySupply

      public long activeMoneySupply()
      Returns the value of the activeMoneySupply record component.
      Returns:
      the value of the activeMoneySupply record component
    • treasuryBalance

      public long treasuryBalance()
      Returns the value of the treasuryBalance record component.
      Returns:
      the value of the treasuryBalance record component
    • issuedToday

      public long issuedToday()
      Returns the value of the issuedToday record component.
      Returns:
      the value of the issuedToday record component
    • destroyedToday

      public long destroyedToday()
      Returns the value of the destroyedToday record component.
      Returns:
      the value of the destroyedToday record component
    • treasuryInToday

      public long treasuryInToday()
      Returns the value of the treasuryInToday record component.
      Returns:
      the value of the treasuryInToday record component
    • treasuryOutToday

      public long treasuryOutToday()
      Returns the value of the treasuryOutToday record component.
      Returns:
      the value of the treasuryOutToday record component
    • flowsToday

      public Map<String,PluginFlow> flowsToday()
      Returns the value of the flowsToday record component.
      Returns:
      the value of the flowsToday record component
    • activePlayersToday

      public int activePlayersToday()
      Returns the value of the activePlayersToday record component.
      Returns:
      the value of the activePlayersToday record component
    • activeMinutesToday

      public long activeMinutesToday()
      Returns the value of the activeMinutesToday record component.
      Returns:
      the value of the activeMinutesToday record component
    • avgActivePlayers7d

      public double avgActivePlayers7d()
      Returns the value of the avgActivePlayers7d record component.
      Returns:
      the value of the avgActivePlayers7d record component
    • dayIndex

      public long dayIndex()
      Returns the value of the dayIndex record component.
      Returns:
      the value of the dayIndex record component
    • weekIndex

      public long weekIndex()
      Returns the value of the weekIndex record component.
      Returns:
      the value of the weekIndex record component