public class DiffLongValueHolder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_DEFAULT_VALUE
This is the value that will be used as defaultValue if no other one was specified.
|
| Constructor and Description |
|---|
DiffLongValueHolder(Interval anInterval) |
| 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() |
long |
getLastValue()
This method returns the lastValue.
|
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 caller)
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.
|
protected void |
setLastValue(long aValue) |
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() |
protected void |
updateLastValueFromCurrent() |
public static final long DEFAULT_DEFAULT_VALUE
public DiffLongValueHolder(Interval anInterval)
public void intervalUpdated(Interval caller)
IIntervalListenerintervalUpdated in interface IIntervalListenercaller - The Interval that calls this methodIIntervalListener.intervalUpdated(net.anotheria.moskito.core.stats.Interval)public void reset()
ValueHolderreset in interface ValueHolderpublic java.lang.String toString()
AbstractValueHolder.toString()protected void updateLastValueFromCurrent()
public long getLastValue()
public void decrease()
ValueHolderpublic void increase()
ValueHolderValueHolder.increase()public void decreaseByDouble(double aValue)
ValueHolderaValue - the amountpublic void decreaseByInt(int aValue)
ValueHolderaValue - the amountpublic void decreaseByLong(long aValue)
ValueHolderaValue - the amountpublic double getValueAsDouble()
ValueHolderpublic int getValueAsInt()
ValueHolderpublic long getValueAsLong()
ValueHolderpublic void increaseByDouble(double aValue)
ValueHolderaValue - the amountpublic void increaseByInt(int aValue)
ValueHolderaValue - the amountpublic void increaseByLong(long aValue)
ValueHolderaValue - the amountpublic void setValueAsDouble(double aValue)
ValueHolderaValue - the new valuepublic void setValueAsInt(int aValue)
ValueHolderaValue - the new valuepublic void setValueAsLong(long aValue)
ValueHolderaValue - the new valuepublic void setDefaultValueAsLong(long aValue)
ValueHolderaValue - the new default valuepublic void setDefaultValueAsInt(int aValue)
ValueHolderaValue - the new default valuepublic void setDefaultValueAsDouble(double aValue)
ValueHolderaValue - the new default valuepublic double getCurrentValueAsDouble()
ValueHolderpublic int getCurrentValueAsInt()
ValueHolderpublic long getCurrentValueAsLong()
ValueHolderpublic void setValueAsString(java.lang.String aValue)
ValueHolderaValue - the new valuepublic java.lang.String getValueAsString()
public java.lang.String getCurrentValueAsString()
protected void setLastValue(long aValue)
Copyright © 2010-2020 anotheria.net. All Rights Reserved.