Package net.anotheria.anodoc.data
Class DoubleProperty
- java.lang.Object
-
- net.anotheria.anodoc.data.DataHolder
-
- net.anotheria.anodoc.data.Property
-
- net.anotheria.anodoc.data.DoubleProperty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,IBasicStoreableObject,IPlainDataObject
public class DoubleProperty extends Property
This class represents a double property (the mapping for double attributes).- Since:
- 1.1
- Version:
- $Id: $Id
- Author:
- another
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DoubleProperty(java.lang.String name, double value)Creates a new DoubleProperty with given name and value.DoubleProperty(java.lang.String name, java.lang.Double value)Creates a new DoubleProperty with given name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcloneValue()cloneValue.doublegetdouble()getdouble.java.lang.DoublegetDouble()getDouble.PropertyTypegetPropertyType()getPropertyType.longgetSizeInBytes()The 'size' of a DataHolder is needed for the quota calculation.
The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
The overhead for administration shouldn't be counted (i.e.voidsetDouble(java.lang.Double aValue)Sets the value of this property to given Float value.voidsetFloat(double aValue)Sets the value of this property to given float value.voidsetValue(java.lang.Object o)Sets the value of this Property.-
Methods inherited from class net.anotheria.anodoc.data.Property
clone, cloneAs, equals, getName, getStorageId, getValue, toString, toXMLNode
-
Methods inherited from class net.anotheria.anodoc.data.DataHolder
getId, hashCode, setId
-
-
-
-
Constructor Detail
-
DoubleProperty
public DoubleProperty(java.lang.String name, double value)Creates a new DoubleProperty with given name and value.- Parameters:
name- aStringobject.value- a double.
-
DoubleProperty
public DoubleProperty(java.lang.String name, java.lang.Double value)Creates a new DoubleProperty with given name and value.- Parameters:
name- aStringobject.value- aDoubleobject.
-
-
Method Detail
-
getDouble
public java.lang.Double getDouble()
getDouble.
- Returns:
- the value of this property as Float object.
-
getdouble
public double getdouble()
getdouble.
- Returns:
- the value of this property as float.
-
setFloat
public void setFloat(double aValue)
Sets the value of this property to given float value.- Parameters:
aValue- a double.
-
setDouble
public void setDouble(java.lang.Double aValue)
Sets the value of this property to given Float value.- Parameters:
aValue- aDoubleobject.
-
setValue
public void setValue(java.lang.Object o)
Sets the value of this Property. Sets the value of this property to given value, whether the value can be a Float or a String.
-
getSizeInBytes
public long getSizeInBytes()
The 'size' of a DataHolder is needed for the quota calculation.
The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
The overhead for administration shouldn't be counted (i.e. the size of an IntProperty is the amount of bytes needed to store the int value itself, not the amount of bytes needed to store the DataHolder object).- Specified by:
getSizeInBytesin classDataHolder- Returns:
- a long.
-
cloneValue
protected java.lang.Object cloneValue()
cloneValue.
- Specified by:
cloneValuein classProperty- Returns:
- a
Objectobject.
-
getPropertyType
public PropertyType getPropertyType()
getPropertyType.
- Specified by:
getPropertyTypein classProperty- Returns:
- a
PropertyTypeobject.
-
-