|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.rmi.value.BaseNonStreamValue
org.apache.jackrabbit.rmi.value.StringValue
public class StringValue
The StringValue
class implements the committed value state for
String values as a part of the State design pattern (Gof) used by this
package.
SerialValue
,
Serialized FormConstructor Summary | |
---|---|
protected |
StringValue(String value)
Creates an instance for the given string value . |
Method Summary | |
---|---|
boolean |
getBoolean()
Returns the string value parsed to a boolean calling the Boolean.valueOf(String) method. |
Calendar |
getDate()
Returns the string value parsed to a Calendar using the
same formatter as the DateValue class. |
double |
getDouble()
Returns the string value parsed to a double calling the Double.valueOf(String) method. |
long |
getLong()
Returns the string value parsed to a long calling the Long.valueOf(String) method. |
String |
getString()
Returns the string value. |
int |
getType()
Returns PropertyType.STRING . |
Methods inherited from class org.apache.jackrabbit.rmi.value.BaseNonStreamValue |
---|
getStream, getValueFormatException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jcr.Value |
---|
getStream |
Constructor Detail |
---|
protected StringValue(String value)
value
.
Method Detail |
---|
public int getType()
PropertyType.STRING
.
getType
in interface Value
public String getString()
getString
in interface Value
public long getLong() throws ValueFormatException
Long.valueOf(String)
method.
getLong
in interface Value
getLong
in class BaseNonStreamValue
ValueFormatException
- if the string cannot be parsed to long.public double getDouble() throws ValueFormatException
Double.valueOf(String)
method.
getDouble
in interface Value
getDouble
in class BaseNonStreamValue
ValueFormatException
- if the string cannot be parsed to double.public Calendar getDate() throws ValueFormatException
Calendar
using the
same formatter as the DateValue
class. This formatting bears the
same issues as parsing and formatting that class.
getDate
in interface Value
getDate
in class BaseNonStreamValue
ValueFormatException
- if the string cannot be parsed into a
Calendar
instance.public boolean getBoolean()
Boolean.valueOf(String)
method.
getBoolean
in interface Value
getBoolean
in class BaseNonStreamValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |