Class Counter.Child

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private DoubleAdder value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Child()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double get()
      Get the value of the counter.
      void inc()
      Increment the counter by 1.
      void inc​(double amt)
      Increment the counter by the given amount.
      • Methods inherited from class java.lang.Object

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

      • Child

        public Child()
    • Method Detail

      • inc

        public void inc()
        Increment the counter by 1.
      • inc

        public void inc​(double amt)
        Increment the counter by the given amount.
        Throws:
        java.lang.IllegalArgumentException - If amt is negative.
      • get

        public double get()
        Get the value of the counter.