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
This is the base class to all number properties, it introduces nullability and the ability to convert to all
number types.
-
Constructor Summary
ConstructorsConstructorDescriptionNumericProperty(String name) NumericProperty(String name, Class genericType) NumericProperty(String name, Class genericType, T value) NumericProperty(String name, T value) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf the field is nullableset(null)will failSets the property value and potentially fires a change eventvoidsetNullable(boolean nullable) If the field is nullableset(null)will failMethods inherited from class PropertyBase
addChangeListener, bindGlobalGetListener, bindGlobalSetListener, firePropertyChanged, getClientProperty, getGenericType, getLabel, getName, putClientProperty, removeChangeListener, setLabel, stopListening, validateCollectionType
-
Constructor Details
-
NumericProperty
-
NumericProperty
-
NumericProperty
-
NumericProperty
-
-
Method Details
-
isNullable
public boolean isNullable()If the field is nullable
set(null)will failReturns
the nullable
-
setNullable
public void setNullable(boolean nullable) If the field is nullable
set(null)will failParameters
nullable: the nullable to set
-
set
-