public class DoubleValueHolder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_DEFAULT_VALUE
This is the value that will be used as defaultValue if no other one was specified.
|
| Constructor and Description |
|---|
DoubleValueHolder(Interval aInterval)
Constructs an instance of DoubleValueHolder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrease()
This method shall decrement the value by one.
|
void |
decreaseByDouble(double aValue)
This method shall decrement the current value by the given amount.
|
void |
decreaseByInt(int aValue)
This method shall decrement the current value by the given amount.
|
void |
decreaseByLong(long aValue)
This method shall decrement the current value by the given amount.
|
double |
getCurrentValueAsDouble()
This method shall return the current value as double for internal use only.
|
int |
getCurrentValueAsInt()
This method shall return the current value as int for internal use only.
|
long |
getCurrentValueAsLong()
This method shall return the current value as long for internal use only.
|
java.lang.String |
getCurrentValueAsString() |
double |
getValueAsDouble()
This method shall return the current value as double.
|
int |
getValueAsInt()
This method shall return the current value as int.
|
long |
getValueAsLong()
This method shall return the current value as long.
|
java.lang.String |
getValueAsString() |
void |
increase()
This method shall increment the value by one.
|
void |
increaseByDouble(double aValue)
This method shall increment the current value by the given amount.
|
void |
increaseByInt(int aValue)
This method shall increment the current value by the given amount.
|
void |
increaseByLong(long aValue)
This method shall increment the current value by the given amount.
|
void |
intervalUpdated(Interval aCaller)
This method will be called if the time of the given Interval was elapsed.
|
void |
reset()
This method shall reset the ValueHolder.
|
void |
setDefaultValueAsDouble(double aValue)
This method shall set a new default value.
|
void |
setDefaultValueAsInt(int aValue)
This method shall set a new default value.
|
void |
setDefaultValueAsLong(long aValue)
This method shall set a new default value.
|
void |
setValueAsDouble(double aValue)
This method shall assign the given value to the current value.
|
void |
setValueAsInt(int aValue)
This method shall assign the given value to the current value.
|
void |
setValueAsLong(long aValue)
This method shall assign the given value to the current value.
|
void |
setValueAsString(java.lang.String aValue)
This method shall assign the given value to the current value.
|
java.lang.String |
toString() |
public static final double DEFAULT_DEFAULT_VALUE
public void intervalUpdated(Interval aCaller)
aCaller - The Interval that calls this methodpublic void reset()
public void increase()
public void decrease()
public int getValueAsInt()
public long getValueAsLong()
public double getValueAsDouble()
public java.lang.String getValueAsString()
public int getCurrentValueAsInt()
public long getCurrentValueAsLong()
public double getCurrentValueAsDouble()
public java.lang.String getCurrentValueAsString()
public void setValueAsInt(int aValue)
aValue - the new valuepublic void setValueAsString(java.lang.String aValue)
aValue - the new valuepublic void setValueAsLong(long aValue)
aValue - the new valuepublic void setValueAsDouble(double aValue)
aValue - the new valuepublic void increaseByInt(int aValue)
aValue - the amountpublic void increaseByLong(long aValue)
aValue - the amountpublic void increaseByDouble(double aValue)
aValue - the amountpublic void decreaseByInt(int aValue)
aValue - the amountpublic void decreaseByLong(long aValue)
aValue - the amountpublic void decreaseByDouble(double aValue)
aValue - the amountpublic void setDefaultValueAsInt(int aValue)
aValue - the new default valuepublic void setDefaultValueAsLong(long aValue)
aValue - the new default valuepublic void setDefaultValueAsDouble(double aValue)
aValue - the new default valuepublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()Copyright © 2010-2020 anotheria.net. All Rights Reserved.