|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.util.properties.PropertyValue
public class PropertyValue
This is the value for a property in a Properties
object. This object
has methods for interpreting the property value as different data types.
A value may not be null
.
This object is immutable.
Constructor Summary | |
---|---|
PropertyValue(String value)
Create a new property value. |
Method Summary | |
---|---|
char |
charAt(int index)
|
boolean |
equals(Object o)
|
boolean |
getBooleanValue()
Get the property value converted to a boolean . |
double |
getDoubleValue()
Get the property value converted to a double . |
float |
getFloatValue()
Get the property value converted to a float . |
int |
getIntValue()
Get the property value converted to an int . |
long |
getLongValue()
Get the property value converted to a long . |
Serializable |
getObjectValue()
Get the property value deserialized to an object. |
String[] |
getSplitStringArrayValue(String regexp)
Get the property value split to a String array value using the supplied regular expression. |
String[] |
getStringArrayValue()
Get the property value split to a String array value. |
String |
getStringValue()
Get the property value. |
int |
hashCode()
|
int |
length()
|
CharSequence |
subSequence(int start,
int end)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyValue(String value) throws NullPointerException
value
- The value. May not be null
.
NullPointerException
- If the value is null
.Method Detail |
---|
public char charAt(int index)
charAt
in interface CharSequence
public int length()
length
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public long getLongValue() throws NumberFormatException
long
.
long
.
NumberFormatException
- If the property value cannot be converted
to a long
.public int getIntValue() throws NumberFormatException
int
.
int
.
NumberFormatException
- If the property value cannot be converted
to an int
.public float getFloatValue() throws NumberFormatException
float
.
float
.
NumberFormatException
- If the property value cannot be converted
to a float
.public double getDoubleValue() throws NumberFormatException
double
.
double
.
NumberFormatException
- If the property value cannot be converted
to a double
.public boolean getBooleanValue()
boolean
.
Boolean.valueOf(String)
is used for the conversion.
boolean
.public Serializable getObjectValue() throws WrappedIOException
WrappedIOException
- If the property value cannot be deserialized.public String getStringValue()
public String[] getStringArrayValue()
Properties.STRING_ARRAY_SPLIT_REGEXP
is used for
splitting the property value into the array.
getSplitStringArrayValue(String)
,
String.split(String)
public String[] getSplitStringArrayValue(String regexp)
regexp
- The regular expression used to split the value into a
String array.
getStringArrayValue()
,
String.split(String)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in interface CharSequence
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |