# Class BooleanProperty<K>

java.lang.Object
com.codename1.properties.PropertyBase<Boolean,K>
com.codename1.properties.Property<Boolean,K>
com.codename1.properties.BooleanProperty<K>

public class BooleanProperty<K> extends Property<Boolean,K>
This is the boolean specific version of property

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BooleanProperty(String name)`
  Creates a boolean property with the given name.
  `BooleanProperty(String name, Boolean value)`
  Creates a boolean property with the given name and initial value.

- ## Method Summary

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

  ### Methods inherited from class Property

  `equals, get, hashCode, set, 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

  - ### BooleanProperty

    public BooleanProperty(String name)
    Creates a boolean property with the given name.

  - ### BooleanProperty

    public BooleanProperty(String name, Boolean value)
    Creates a boolean property with the given name and initial value.

- ## Method Details

  - ### getBoolean

    public boolean getBoolean()

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

    ###### Returns

    the numeric value