Package net.anotheria.anodoc.data
Class FloatProperty
- java.lang.Object
-
- net.anotheria.anodoc.data.DataHolder
-
- net.anotheria.anodoc.data.Property
-
- net.anotheria.anodoc.data.FloatProperty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,IBasicStoreableObject,IPlainDataObject
public class FloatProperty extends Property
This class represents a float property (the mapping for float attributes)- Since:
- 1.0
- Version:
- $Id: $Id
- Author:
- another
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FloatProperty(java.lang.String name, float value)Creates a new FloatProperty with given name and value.FloatProperty(java.lang.String name, java.lang.Float value)Creates a new FloatProperty with given name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcloneValue()cloneValue.floatgetfloat()Returns the value of this property as float.java.lang.FloatgetFloat()Returns the value of this property as Float object.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.voidsetFloat(float aValue)Sets the value of this property to given float value.voidsetFloat(java.lang.Float 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
-
FloatProperty
public FloatProperty(java.lang.String name, float value)Creates a new FloatProperty with given name and value.- Parameters:
name- aStringobject.value- a float.
-
FloatProperty
public FloatProperty(java.lang.String name, java.lang.Float value)Creates a new FloatProperty with given name and value.- Parameters:
name- aStringobject.value- aFloatobject.
-
-
Method Detail
-
getFloat
public java.lang.Float getFloat()
Returns the value of this property as Float object.- Returns:
- a
Floatobject.
-
getfloat
public float getfloat()
Returns the value of this property as float.- Returns:
- a float.
-
setFloat
public void setFloat(float aValue)
Sets the value of this property to given float value.- Parameters:
aValue- a float.
-
setFloat
public void setFloat(java.lang.Float aValue)
Sets the value of this property to given Float value.- Parameters:
aValue- aFloatobject.
-
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). Returns the size needed to hold a float value in bytes (8).- Specified by:
getSizeInBytesin classDataHolder- Returns:
- a long.
- See Also:
DataHolder.getSizeInBytes()
-
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.
-
-