Package ome.util

Class Counter


  • public class Counter
    extends java.lang.Object
    A simple integral counter that can be incremented. Its properties include,
    • unbounded
    • increment() typically does not require a heap allocation
    • not thread-safe.
    Since:
    5.4.2
    • Constructor Summary

      Constructors 
      Constructor Description
      Counter()
      Create a new counter starting at zero.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.math.BigInteger asBigInteger()  
      void increment()
      Increment the value of this counter by one.
      void reset()
      Reset this counter to zero.
      • Methods inherited from class java.lang.Object

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

      • Counter

        public Counter()
        Create a new counter starting at zero.
    • Method Detail

      • increment

        public void increment()
        Increment the value of this counter by one.
      • reset

        public void reset()
        Reset this counter to zero.
      • asBigInteger

        public java.math.BigInteger asBigInteger()
        Returns:
        the integer value of this counter