Class Property<T,K>
java.lang.Object
com.codename1.properties.PropertyBase<T,K>
com.codename1.properties.Property<T,K>
- Direct Known Subclasses:
BooleanProperty, NumericProperty
Base class for a property, it can store a generic value of any type and broadcast change events to
external listeners
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a property with null valueConstructs a property with null valueConstructs a property with the given name and valueConstructs a property with the given name and value -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(java.lang.Object obj) Compares this property to another propertyget()Gets the property valueinthashCode()Returns the internal hashcode or 0 for null propertySets the property value and potentially fires a change eventtoString()Default toString that provides easier debug informationMethods 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
-
Property
-
Property
-
Property
Constructs a property with null value
Parameters
name: the name of the property
-
Property
Constructs a property with null value
Parameters
-
genericType: the type of the property -
name: the name of the property
-
-
-
Method Details
-
get
Gets the property value
Returns
the property value
-
set
-
equals
public boolean equals(java.lang.Object obj) Compares this property to another property
Parameters
obj: the other property
Returns
true if they are equal in name and value
- Overrides:
equalsin classPropertyBase<T,K>
-
hashCode
public int hashCode()Returns the internal hashcode or 0 for null property
Returns
the hashcode value
- Overrides:
hashCodein classPropertyBase<T,K>
-
toString
Description copied from class:PropertyBaseDefault toString that provides easier debug information
Returns
a formatted representation of the property for debugging
- Overrides:
toStringin classPropertyBase<T,K>
-