public class SmartPropertyInteger
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SmartPropertyInteger.IPropertyChangeListener
Defines the interface for
SmartPropertyInteger listener |
Constructor and Description |
---|
SmartPropertyInteger(SmartPropertyInteger.IPropertyChangeListener listener)
Creates a new instance of
SmartPropertyInteger class |
SmartPropertyInteger(SmartPropertyInteger.IPropertyChangeListener listener,
int defaultValue)
Creates a new instance of
SmartPropertyInteger class |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
getValue()
Gets the current property value
|
int |
hashCode() |
void |
setStrongValue(int newValue)
Sets weak value for this property which overrides any previously set value
|
void |
setWeakValue(int newValue)
Sets weak value for this property if it was not overridden by
SmartProperty.setStrongValue(Object) call |
java.lang.String |
toString() |
public SmartPropertyInteger(@NonNull SmartPropertyInteger.IPropertyChangeListener listener, int defaultValue)
SmartPropertyInteger
classlistener
- The listener change listener for this propertydefaultValue
- The default value for propertypublic SmartPropertyInteger(@NonNull SmartPropertyInteger.IPropertyChangeListener listener)
SmartPropertyInteger
classlistener
- The listener change listener for this propertypublic void setWeakValue(int newValue)
SmartProperty.setStrongValue(Object)
callnewValue
- The new value for propertypublic void setStrongValue(int newValue)
newValue
- The new value for propertypublic int 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