# Class CharProperty<K>

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

public class CharProperty<K> extends NumericProperty<Character, K>
This is the char specific version of numeric property

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CharProperty(String name)`
  Creates a char property with the given name.
  `CharProperty(String name, Character value)`
  Creates a char property with the given name and initial value.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `char`
  `getChar()`
  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

  - ### CharProperty

    public CharProperty(String name)

    Creates a char property with the given name.

    ###### Parameters

    - `name`: the property name.

  - ### CharProperty

    public CharProperty(String name, Character value)

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

    ###### Parameters

    - `name`: the property name.

    - `value`: the initial property value.

- ## Method Details

  - ### getChar

    public char getChar()

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

    ###### Returns

    the numeric value