Coverage Report - org.mule.util.counters.impl.Number
 
Classes in this File Line Coverage Branch Coverage Complexity
Number
0%
0/16
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.util.counters.impl;
 8  
 
 9  
 import org.mule.util.counters.CounterFactory.Type;
 10  
 
 11  
 public class Number extends AbstractCounter
 12  
 {
 13  
 
 14  0
     private double value = 0.0;
 15  
 
 16  
     public Number(String name)
 17  
     {
 18  0
         super(name, Type.NUMBER);
 19  0
     }
 20  
 
 21  
     public synchronized double increment()
 22  
     {
 23  0
         this.value++;
 24  0
         propagate();
 25  0
         return this.value;
 26  
     }
 27  
 
 28  
     public synchronized double incrementBy(double value)
 29  
     {
 30  0
         this.value += value;
 31  0
         propagate();
 32  0
         return this.value;
 33  
     }
 34  
 
 35  
     public synchronized double decrement()
 36  
     {
 37  0
         this.value--;
 38  0
         propagate();
 39  0
         return this.value;
 40  
     }
 41  
 
 42  
     public synchronized void setRawValue(double value)
 43  
     {
 44  0
         this.value = value;
 45  0
         propagate();
 46  0
     }
 47  
 
 48  
     public synchronized double nextValue()
 49  
     {
 50  0
         return this.value;
 51  
     }
 52  
 
 53  
 }