T
- Type of object to holdpublic class SmartProperty<T>
extends java.lang.Object
Object
instancesConstructor and Description |
---|
SmartProperty()
Creates a new instance of
SmartProperty class |
SmartProperty(T defaultValue)
Creates a new instance of
SmartProperty class |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
T |
getValue()
Gets the current property value
|
int |
hashCode() |
protected void |
onPropertyChanged(T oldValue,
T newValue)
Called when property value is changed
|
void |
setStrongValue(T newValue)
Sets weak value for this property which overrides any previously set value
|
void |
setWeakValue(T newValue)
Sets weak value for this property if it was not overridden by
setStrongValue(Object) call |
java.lang.String |
toString() |
public SmartProperty(T defaultValue)
SmartProperty
classdefaultValue
- The default value for propertypublic SmartProperty()
SmartProperty
classpublic final void setWeakValue(T newValue)
setStrongValue(Object)
callnewValue
- The new value for propertypublic final void setStrongValue(T newValue)
newValue
- The new value for propertyprotected void onPropertyChanged(T oldValue, T newValue)
oldValue
- The old valuenewValue
- The new valuepublic final T getValue()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object