org.priha.core.values
Class StringValueImpl
java.lang.Object
org.priha.core.values.ValueImpl
org.priha.core.values.StringValueImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ValueImpl>, javax.jcr.Value
public class StringValueImpl
- extends ValueImpl
- implements javax.jcr.Value, java.io.Serializable
- See Also:
- Serialized Form
Method Summary |
protected java.lang.Object |
clone()
|
boolean |
getBoolean()
|
java.util.Calendar |
getDate()
|
double |
getDouble()
|
long |
getLong()
|
java.io.InputStream |
getStream()
By default, returns the inputstream of the String representation. |
java.lang.String |
getString()
|
int |
getType()
|
java.lang.String |
toString()
|
java.lang.String |
valueAsString()
Allows getting the Value as a String without regard to the current Stream/Value format
setting. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StringValueImpl
public StringValueImpl(java.lang.String value)
getType
public int getType()
- Specified by:
getType
in interface javax.jcr.Value
getBoolean
public boolean getBoolean()
- Specified by:
getBoolean
in interface javax.jcr.Value
- Overrides:
getBoolean
in class ValueImpl
getString
public java.lang.String getString()
throws javax.jcr.ValueFormatException,
java.lang.IllegalStateException,
javax.jcr.RepositoryException
- Specified by:
getString
in interface javax.jcr.Value
- Overrides:
getString
in class ValueImpl
- Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
getDate
public java.util.Calendar getDate()
throws javax.jcr.ValueFormatException
- Specified by:
getDate
in interface javax.jcr.Value
- Overrides:
getDate
in class ValueImpl
- Throws:
javax.jcr.ValueFormatException
getDouble
public double getDouble()
throws javax.jcr.ValueFormatException
- Specified by:
getDouble
in interface javax.jcr.Value
- Overrides:
getDouble
in class ValueImpl
- Throws:
javax.jcr.ValueFormatException
getLong
public long getLong()
throws javax.jcr.ValueFormatException
- Specified by:
getLong
in interface javax.jcr.Value
- Overrides:
getLong
in class ValueImpl
- Throws:
javax.jcr.ValueFormatException
getStream
public java.io.InputStream getStream()
throws java.lang.IllegalStateException,
javax.jcr.RepositoryException
- Description copied from class:
ValueImpl
- By default, returns the inputstream of the String representation.
- Specified by:
getStream
in interface javax.jcr.Value
- Overrides:
getStream
in class ValueImpl
- Throws:
java.lang.IllegalStateException
javax.jcr.RepositoryException
toString
public java.lang.String toString()
- Overrides:
toString
in class ValueImpl
valueAsString
public java.lang.String valueAsString()
- Description copied from class:
ValueImpl
- Allows getting the Value as a String without regard to the current Stream/Value format
setting. This means that this method can be called at any time.
- Overrides:
valueAsString
in class ValueImpl
- Returns:
- The value as a String. However, may return null in case the conversion
cannot be made. Default implementation returns null and subclasses are expected
to override this.
clone
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException