|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.configuration.Property org.rhq.core.domain.configuration.PropertySimple
public class PropertySimple
This type of Property
stores a simple Java primitive value in string form. Null values are allowed.
Field Summary | |
---|---|
static int |
MAX_VALUE_LENGTH
|
Fields inherited from class org.rhq.core.domain.configuration.Property |
---|
QUERY_DELETE_BY_PROPERTY_IDS |
Constructor Summary | |
---|---|
|
PropertySimple()
Constructor for PropertySimple that stores a null value. |
protected |
PropertySimple(PropertySimple original,
boolean keepId)
|
|
PropertySimple(String name,
Object value)
Constructs a property that has the given name with the given value. |
Method Summary | |
---|---|
protected void |
appendToStringInternals(StringBuilder str)
Subclasses can override this to add things it wants to see in the toString. |
PropertySimple |
deepCopy(boolean keepId)
|
boolean |
equals(Object obj)
|
Boolean |
getBooleanValue()
Returns this property value as a Boolean. |
Double |
getDoubleValue()
Returns this property value as a Double. |
Float |
getFloatValue()
Returns this property value as a Float. |
Integer |
getIntegerValue()
Returns this property value as a Integer. |
Long |
getLongValue()
Returns this property value as a Long. |
Boolean |
getOverride()
|
String |
getStringValue()
Returns the value (in string form) of this property, which may be null . |
int |
hashCode()
|
boolean |
isMasked()
|
void |
mask()
|
void |
setBooleanValue(Boolean value)
Sets the value of this property to the toString form of the given value . |
void |
setDoubleValue(Double value)
Sets the value of this property to the toString form of the given value . |
void |
setFloatValue(Float value)
Sets the value of this property to the toString form of the given value . |
void |
setIntegerValue(Integer value)
Sets the value of this property to the toString form of the given value . |
void |
setLongValue(Long value)
Sets the value of this property to the toString form of the given value . |
void |
setOverride(Boolean override)
|
void |
setStringValue(String value)
Sets the value of this property to the given value . |
void |
setValue(Object value)
Sets the value of this property to the toString form of the given value . |
Methods inherited from class org.rhq.core.domain.configuration.Property |
---|
compareTo, getConfiguration, getErrorMessage, getId, getName, getParentList, getParentMap, setConfiguration, setErrorMessage, setId, setName, setParentList, setParentMap, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_VALUE_LENGTH
Constructor Detail |
---|
public PropertySimple()
PropertySimple
that stores a null
value.
NOTE: When using this constructor, you need to supply a name via #setName manually.
protected PropertySimple(PropertySimple original, boolean keepId)
public PropertySimple(@NotNull String name, @Nullable Object value)
toString
representation will be stored in this object - value
itself will not be stored (that is, this object
will not hold a reference to value
).
name
- value
- Method Detail |
---|
public void setValue(@Nullable Object value)
toString
form of the given value
. This object
will not hold a reference to value
.
value
- @Nullable public String getStringValue()
null
.
This may return null
public void setStringValue(@Nullable String value)
value
.
Calling this method is the same as if calling setValue(Object)
.
value
- @Nullable public Boolean getBooleanValue()
Boolean.parseBoolean(String)
for the behavior of this
method.
This may return null
public void setBooleanValue(@Nullable Boolean value)
toString
form of the given value
. This object
will not hold a reference to the value
.
Calling this method is the same as if calling setValue(Object)
.
value
- @Nullable public Long getLongValue()
Long.parseLong(String)
for the behavior of this method.
This may return null
public void setLongValue(@Nullable Long value)
toString
form of the given value
. This object
will not hold a reference to the value
.
Calling this method is the same as if calling setValue(Object)
.
value
- @Nullable public Integer getIntegerValue()
Integer.parseInt(String)
for the behavior of this method.
This may return null
public void setIntegerValue(@Nullable Integer value)
toString
form of the given value
. This object
will not hold a reference to the value
.
Calling this method is the same as if calling setValue(Object)
.
value
- @Nullable public Float getFloatValue()
Float.parseFloat(String)
for the behavior of this method.
This may return null
public void setFloatValue(@Nullable Float value)
toString
form of the given value
. This object
will not hold a reference to the value
.
Calling this method is the same as if calling setValue(Object)
.
value
- @Nullable public Double getDoubleValue()
Double.parseDouble(String)
for the behavior of this method.
This may return null
public void setDoubleValue(@Nullable Double value)
toString
form of the given value
. This object
will not hold a reference to the value
.
Calling this method is the same as if calling setValue(Object)
.
value
- public Boolean getOverride()
public void setOverride(Boolean override)
public boolean isMasked()
public void mask()
public boolean equals(Object obj)
equals
in class Property
public int hashCode()
hashCode
in class Property
public PropertySimple deepCopy(boolean keepId)
deepCopy
in interface DeepCopyable<Property>
deepCopy
in class Property
protected void appendToStringInternals(StringBuilder str)
Property
appendToStringInternals
in class Property
str
- the builder to append strings to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |