public abstract class NumericProperty<T, K>

  1. Object
  2. PropertyBase<T, K>
  3. Property<T, K>
  4. NumericProperty

Known subtypesByteProperty, 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.

Constructors

public NumericProperty(String name)Creates a numeric property with the given name.
public NumericProperty(String name, Class genericType)Creates a numeric property with the given name and explicit value type.
public NumericProperty(String name, T value)Creates a numeric property with the given name and initial value.
public NumericProperty(String name, Class genericType, T value)Creates a numeric property with the given name, type, and initial value.

Methods

public boolean isNullable()If the field is nullable set(null) will fail
public void setNullable(boolean nullable)If the field is nullable set(null) will fail
public K set(T value)Sets the property value and potentially fires a change event

Inherited methods

Constructor details

NumericProperty

public NumericProperty(String name)
Creates a numeric property with the given name.

NumericProperty

public NumericProperty(String name, Class genericType)
Creates a numeric property with the given name and explicit value type.

NumericProperty

public NumericProperty(String name, T value)
Creates a numeric property with the given name and initial value.

NumericProperty

public NumericProperty(String name, Class genericType, T value)
Creates a numeric property with the given name, type, and initial 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 boolean
the nullable to set

set

public K set(T value)
Sets the property value and potentially fires a change event

Parameters

value T
the new value