# Class NumericProperty<T,K>

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

Direct Known Subclasses:
  `ByteProperty, CharProperty, DoubleProperty, FloatProperty, IntProperty, LongProperty`

public abstract class NumericProperty<T,K> extends Property<T,K>
This is the base class to all number properties, it introduces nullability and the ability to convert to all number types.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NumericProperty(String name)`
  `NumericProperty(String name, Class genericType)`
  `NumericProperty(String name, Class genericType, T value)`
  `NumericProperty(String name, T value)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isNullable()`
  If the field is nullable `set(null)` will fail
  `K`
  `set(T value)`
  Sets the property value and potentially fires a change event
  `void`
  `setNullable(boolean nullable)`
  If the field is nullable `set(null)` will fail

  ### 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

  - ### NumericProperty

    public NumericProperty(String name)

  - ### NumericProperty

    public NumericProperty(String name, Class genericType)

  - ### NumericProperty

    public NumericProperty(String name, T value)

  - ### NumericProperty

    public NumericProperty(String name, Class genericType, T value)

- ## Method Details

  - ### isNullable

    public boolean isNullable()

    If the field is nullable `set(null)` will fail

    ###### Returns

    the nullable

  - ### setNullable

    public void setNullable(boolean nullable)

    If the field is nullable `set(null)` will fail

    ###### Parameters

    - `nullable`: the nullable to set

  - ### set

    public K set(T value)
    Description copied from class: `Property`

    Sets the property value and potentially fires a change event

    ###### Parameters

    - `value`: the new value
    Overrides:
      `set` in class `Property<T,K>`