public class StringValue extends BaseValue
StringValue
provides an implementation
of the Value
interface representing a string value.Modifier and Type | Field and Description |
---|---|
static int |
TYPE |
DEFAULT_ENCODING, stream, type
Constructor and Description |
---|
StringValue(String text)
Constructs a
StringValue object representing a string. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
protected String |
getInternalString()
Returns the internal string representation of this value without modifying
the value state.
|
int |
hashCode()
Returns zero to satisfy the Object equals/hashCode contract.
|
getBinary, getBoolean, getDate, getDecimal, getDouble, getLong, getStream, getString, getType
public static final int TYPE
public StringValue(String text)
StringValue
object representing a string.text
- the string this StringValue
should representpublic boolean equals(Object obj)
The result is true
if and only if the argument is not
null
and is a StringValue
object that
represents the same value as this object.
public int hashCode()
hashCode
in class Object
Object.hashCode()
protected String getInternalString() throws javax.jcr.ValueFormatException
getInternalString
in class BaseValue
javax.jcr.ValueFormatException
- if the value can not be represented as a
String
or if the value is
null
.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.