Interface Counters.Counter

Enclosing class:
Counters

public static interface Counters.Counter
Counts using a number.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    add(long val)
    Adds the given number to this counter.
    long
    get()
    Gets the counter as a long.
    Gets the counter as a BigInteger.
    Gets the counter as a Long.
    void
    Adds one to this counter.
    default void
    Resets this count to 0.
  • Method Details Link icon

    • add Link icon

      void add(long val)
      Adds the given number to this counter.
      Parameters:
      val - the value to add.
    • get Link icon

      long get()
      Gets the counter as a long.
      Returns:
      the counter as a long.
    • getBigInteger Link icon

      Gets the counter as a BigInteger.
      Returns:
      the counter as a BigInteger.
    • getLong Link icon

      Gets the counter as a Long.
      Returns:
      the counter as a Long.
    • increment Link icon

      void increment()
      Adds one to this counter.
    • reset Link icon

      default void reset()
      Resets this count to 0.