# Class FloatProperty<K>

java.lang.Object
com.codename1.properties.PropertyBase<Float,K>
com.codename1.properties.Property<Float,K>
com.codename1.properties.NumericProperty<Float,K>
com.codename1.properties.FloatProperty<K>

public class FloatProperty<K> extends NumericProperty<Float,K>
This is the float specific version of numeric property

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FloatProperty(String name)`
  Creates a float property with the given name.
  `FloatProperty(String name, Float value)`
  Creates a float property with the given name and initial value.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `getFloat()`
  Returns the value as a primitive, if the value is null/nullable this will fail...

  ### Methods inherited from class NumericProperty

  `isNullable, set, setNullable`

  ### Methods inherited from class Property

  `equals, get, hashCode, toString`

  ### Methods inherited from class PropertyBase

  `addChangeListener, bindGlobalGetListener, bindGlobalSetListener, firePropertyChanged, getClientProperty, getGenericType, getLabel, getName, putClientProperty, removeChangeListener, setLabel, stopListening, validateCollectionType`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### FloatProperty

    public FloatProperty(String name)

    Creates a float property with the given name.

    ###### Parameters

    - `name`: the property name.

  - ### FloatProperty

    public FloatProperty(String name, Float value)

    Creates a float property with the given name and initial value.

    ###### Parameters

    - `name`: the property name.

    - `value`: the initial property value.

- ## Method Details

  - ### getFloat

    public float getFloat()

    Returns the value as a primitive, if the value is null/nullable this will fail...

    ###### Returns

    the numeric value