Interface Counter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long decrement()
      Decrements by one the current counter value.
      long getValue()
      Gets the current counter value, regardless whether it's enabled or not.
      long increment()
      Increments by one the current counter value.
      void reset()
      Resets the counter, regardless whether it's enabled or not.
    • Method Detail

      • getValue

        long getValue()
        Gets the current counter value, regardless whether it's enabled or not.
      • increment

        long increment()
        Increments by one the current counter value.
        Returns:
        the incremented value if enabled. Otherwise, returns 0.
      • decrement

        long decrement()
        Decrements by one the current counter value.
        Returns:
        the decremented value if enabled. Otherwise, returns 0.
      • reset

        void reset()
        Resets the counter, regardless whether it's enabled or not.