Class 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.Object cloneValue()
      cloneValue.
      float getfloat()
      Returns the value of this property as float.
      java.lang.Float getFloat()
      Returns the value of this property as Float object.
      PropertyType getPropertyType()
      getPropertyType.
      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.
      void setFloat​(float aValue)
      Sets the value of this property to given float value.
      void setFloat​(java.lang.Float aValue)
      Sets the value of this property to given Float value.
      void setValue​(java.lang.Object o)
      Sets the value of this Property.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FloatProperty

        public FloatProperty​(java.lang.String name,
                             float value)
        Creates a new FloatProperty with given name and value.
        Parameters:
        name - a String object.
        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 - a String object.
        value - a Float object.
    • Method Detail

      • getFloat

        public java.lang.Float getFloat()
        Returns the value of this property as Float object.
        Returns:
        a Float object.
      • 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 - a Float object.
      • 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.
        Overrides:
        setValue in class Property
        Parameters:
        o - object to set
      • 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:
        getSizeInBytes in class DataHolder
        Returns:
        a long.
        See Also:
        DataHolder.getSizeInBytes()
      • cloneValue

        protected java.lang.Object cloneValue()

        cloneValue.

        Specified by:
        cloneValue in class Property
        Returns:
        a Object object.