org.apache.jackrabbit.value
Class StringValue
java.lang.Object
org.apache.jackrabbit.value.BaseValue
org.apache.jackrabbit.value.StringValue
- All Implemented Interfaces:
- Value
- public class StringValue
- extends BaseValue
A StringValue
provides an implementation
of the Value
interface representing a string value.
Field Summary |
static int |
TYPE
|
Constructor Summary |
StringValue(String text)
Constructs a StringValue object representing a string. |
Method Summary |
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. |
TYPE
public static final int TYPE
- See Also:
- Constant Field Values
StringValue
public StringValue(String text)
- Constructs a
StringValue
object representing a string.
- Parameters:
text
- the string this StringValue
should represent
equals
public boolean equals(Object obj)
- Indicates whether some other object is "equal to" this one.
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.
- Parameters:
obj
- the reference object with which to compare.
- Returns:
true
if this object is the same as the obj
argument; false
otherwise.
hashCode
public int hashCode()
- Returns zero to satisfy the Object equals/hashCode contract.
This class is mutable and not meant to be used as a hash key.
- Returns:
- always zero
- See Also:
Object.hashCode()
getInternalString
protected String getInternalString()
throws ValueFormatException
- Returns the internal string representation of this value without modifying
the value state.
- Specified by:
getInternalString
in class BaseValue
- Returns:
- the internal string representation
- Throws:
ValueFormatException
- if the value can not be represented as a
String
or if the value is
null
.
Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.