Counter

sealed class Counter(source)

Utility for counting things.

Inheritors

Types

Link copied to clipboard
class Bit32 : Counter

A counter that utilizes 32-bit numbers, providing a maximum count of 2^64.

Link copied to clipboard
class Bit64 : Counter

A counter that utilizes 64-bit numbers, providing a maximum count of 2^128.

Link copied to clipboard
sealed class Final

Holder of the count produced by final.

Functions

Link copied to clipboard
abstract fun copy(): Counter

Copies the instance and its state to a new Counter

Link copied to clipboard
abstract fun final(additional: Int): Counter.Final

Produces a final count, including any additional value needed to be added (such as the size of buffered input).

Link copied to clipboard
abstract fun increment()

Increments the count

Link copied to clipboard
abstract fun reset()

Resets the count to 0:0