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