All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstreetmap.atlas.utilities.scalars.DoubleCounter Maven / Gradle / Ivy

There is a newer version: 7.0.8
Show newest version
package org.openstreetmap.atlas.utilities.scalars;

/**
 * Double counter Wrapper
 *
 * @author jklamer
 */
public class DoubleCounter
{
    private double value;

    public DoubleCounter()
    {
        this.value = 0.0;
    }

    public DoubleCounter(final double start)
    {
        this.value = start;

    }

    public void add(final double delta)
    {
        this.value += delta;
    }

    public double getValue()
    {
        return this.value;
    }

    public void reset()
    {
        this.value = 0.0;
    }

    @Override
    public String toString()
    {
        return String.valueOf(this.value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy