public class Property
extends java.lang.Object
implements java.lang.Comparable
hashCode()
and
equals(Object)
are based on the key
attribute. The
attributes key
and initialValue
are immutable.Constructor and Description |
---|
Property(java.lang.String key,
java.lang.String initialValue,
java.lang.String value)
Constructor with all values.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getInitialValue()
Returns the initial value of the property.
|
java.lang.String |
getKey()
Returns the key of the property.
|
java.lang.String |
getStatus()
Returns a 3-code status text.
|
java.lang.String |
getValue()
Returns the current value of the property.
|
boolean |
hasChanged()
Returns if the value has changed since construction.
|
int |
hashCode() |
boolean |
isDeleted()
Returns if the value has been deleted since construction.
|
boolean |
isNew()
Returns if the value has been created since construction.
|
void |
setValue(java.lang.String value)
Sets the current value of the property.
|
java.lang.String |
toKeyValue()
Returns the key and value separated by an equal sign.
|
java.lang.String |
toString() |
public Property(java.lang.String key, java.lang.String initialValue, java.lang.String value)
key
- Unique name - Cannot be null
.initialValue
- Initial value.value
- Value.public final java.lang.String getValue()
public final void setValue(java.lang.String value)
value
- Value to set.public final java.lang.String getInitialValue()
public final java.lang.String getKey()
public final boolean hasChanged()
true
else
false
.public final boolean isDeleted()
null
true
else false
.public final boolean isNew()
null
value
true
else false
.public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public final java.lang.String toKeyValue()
public final java.lang.String getStatus()
public final java.lang.String toString()
toString
in class java.lang.Object