Package com.storedobject.core
Class ComputedDouble
- All Implemented Interfaces:
ComputedValue<Double>,Displayable,Storable,Cloneable,Comparable<ComputedDouble>
public class ComputedDouble
extends AbstractComputedValue<Double>
implements Comparable<ComputedDouble>
-
Field Summary
Fields inherited from class com.storedobject.core.AbstractComputedValue
computed -
Constructor Summary
ConstructorsConstructorDescriptionComputedDouble(double value) ComputedDouble(double value, boolean computed) ComputedDouble(ComputedDouble value) -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of thisComputedValueinstance.intstatic ComputedDoubleGet the storable value.doublegetValue()Retrieves the value object associated with this instance.voidset(ComputedDouble value) voidsetValue(double value) voidSets the value for the current instance.Convert to a displayable string.toString()Methods inherited from class com.storedobject.core.AbstractComputedValue
equals, isComputed, setComputedMethods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.storedobject.common.ComputedValue
consider, consider, enable, ignore, ignore, isManual, reverseStatus, setManual
-
Constructor Details
-
ComputedDouble
public ComputedDouble() -
ComputedDouble
public ComputedDouble(double value) -
ComputedDouble
public ComputedDouble(double value, boolean computed) -
ComputedDouble
-
-
Method Details
-
create
-
set
-
getStorableValue
Description copied from interface:StorableGet the storable value. By default,Object.toString()is returned.- Specified by:
getStorableValuein interfaceStorable- Returns:
- Storable value as a string.
-
getValue
public double getValue() -
setValue
public void setValue(double value) -
toString
- Overrides:
toStringin classAbstractComputedValue<Double>
-
toDisplay
Description copied from interface:DisplayableConvert to a displayable string. The default implementation returns theStringUtility.toStringInt(Object)value.- Specified by:
toDisplayin interfaceDisplayable- Overrides:
toDisplayin classAbstractComputedValue<Double>- Returns:
- A displayable string.
-
compareTo
- Specified by:
compareToin interfaceComparable<ComputedDouble>
-
clone
Description copied from interface:ComputedValueCreates and returns a copy of thisComputedValueinstance. The cloned object is a new instance identical to the original, maintaining the same state and value.- Specified by:
clonein interfaceComputedValue<Double>- Specified by:
clonein classAbstractComputedValue<Double>- Returns:
- a new
ComputedValue<T>instance that is a copy of the current object
-
setValue
Description copied from interface:ComputedValueSets the value for the current instance. The provided value may be manually set or used in conjunction with the computed state of the object, depending on other methods and logic in the class.- Specified by:
setValuein interfaceComputedValue<Double>- Parameters:
value- the value to be set for the current instance
-
getValueObject
Description copied from interface:ComputedValueRetrieves the value object associated with this instance.- Specified by:
getValueObjectin interfaceComputedValue<Double>- Returns:
- the value object of type
T.
-