Class Statistics


  • public class Statistics
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Statistics​(rs.kreme.ksbot.api.KSContext ctx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decrement​(java.lang.String key, long amount)
      Decrement a specific stat by amount
      java.util.Map<java.lang.String,​java.lang.Long> export()
      Export a flat key/value map for JSON serialization
      long get​(java.lang.String key)
      Retrieve a stat value
      void increment​(java.lang.String key, long amount)
      Increment a specific stat by amount
      void reset()
      Reset all statistics
      void set​(java.lang.String key, long value)
      Set a specific stat to an exact value
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Statistics

        public Statistics​(rs.kreme.ksbot.api.KSContext ctx)
    • Method Detail

      • increment

        public void increment​(java.lang.String key,
                              long amount)
        Increment a specific stat by amount
      • decrement

        public void decrement​(java.lang.String key,
                              long amount)
        Decrement a specific stat by amount
      • set

        public void set​(java.lang.String key,
                        long value)
        Set a specific stat to an exact value
      • get

        public long get​(java.lang.String key)
        Retrieve a stat value
      • export

        public java.util.Map<java.lang.String,​java.lang.Long> export()
        Export a flat key/value map for JSON serialization
      • reset

        public void reset()
        Reset all statistics