Class Counter


  • public class Counter
    extends java.lang.Object
    A simple class that counts... Note: This is probably the best piece of software I'll ever write! :-P
    Author:
    pcingola
    • Field Summary

      Fields 
      Modifier and Type Field Description
      long count  
    • Constructor Summary

      Constructors 
      Constructor Description
      Counter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long add​(long add)  
      long dec()  
      long get()  
      long getCount()  
      long inc()  
      void reset()  
      void set​(long newCount)  
      long sub​(long sub)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • count

        public long count
    • Constructor Detail

      • Counter

        public Counter()
    • Method Detail

      • add

        public long add​(long add)
      • dec

        public long dec()
      • get

        public long get()
      • getCount

        public long getCount()
      • inc

        public long inc()
      • reset

        public void reset()
      • set

        public void set​(long newCount)
      • sub

        public long sub​(long sub)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object