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) Creates a numeric property with the given name.NumericProperty(String name, java.lang.Class genericType) Creates a numeric property with the given name and explicit value type.NumericProperty(String name, java.lang.Class genericType, T value) Creates a numeric property with the given name, type, and initial value.NumericProperty(String name, T value) Creates a numeric property with the given name and initial 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, validateCollectionTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
NumericProperty
Creates a numeric property with the given name. -
NumericProperty
Creates a numeric property with the given name and explicit value type. -
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
-