|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.entry.AbstractValue<String>
org.apache.directory.api.ldap.model.entry.StringValue
public class StringValue
A server side schema aware wrapper around a String attribute value. This value wrapper uses schema information to syntax check values, and to compare them for equality and ordering. It caches results and invalidates them when the wrapped value changes.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.api.ldap.model.entry.AbstractValue |
|---|
attributeType, h, LOG, normalizedValue, wrappedValue |
| Fields inherited from interface org.apache.directory.api.ldap.model.entry.Value |
|---|
BINARY, STRING |
| Constructor Summary | |
|---|---|
StringValue(AttributeType attributeType,
String value)
Creates a schema aware StringValue with an initial wrapped String value. |
|
StringValue(String value)
Creates a StringValue with an initial wrapped String value. |
|
| Method Summary | |
|---|---|
StringValue |
clone()
Clone a Value |
int |
compareTo(Value<String> value)
|
static StringValue |
deserialize(AttributeType attributeType,
ObjectInput in)
Deserialize a schemaAware StringValue. |
static StringValue |
deserialize(ObjectInput in)
Deserialize a StringValue. |
boolean |
equals(Object obj)
Two StringValue are equals if their normalized values are equal |
byte[] |
getBytes()
Get the wrapped value as a byte[]. |
String |
getNormValue()
Gets the normalized (canonical) representation for the wrapped string. |
String |
getString()
Get the wrapped value as a String. |
String |
getValue()
Get the wrapped value. |
int |
hashCode()
|
boolean |
isHumanReadable()
Tells if the current value is Human Readable |
int |
length()
|
void |
readExternal(ObjectInput in)
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.apache.directory.api.ldap.model.entry.AbstractValue |
|---|
apply, getAttributeType, getLdapComparator, getNormReference, getReference, isInstanceOf, isNull, isSchemaAware, isValid |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringValue(String value)
value - the value to wrap which can be null
public StringValue(AttributeType attributeType,
String value)
throws LdapInvalidAttributeValueException
attributeType - the schema type associated with this StringValuevalue - the value to wrap
LdapInvalidAttributeValueException - If the added value is invalid accordingly
to the schema| Method Detail |
|---|
public String getValue()
public String getNormValue()
public int compareTo(Value<String> value)
IllegalStateException - on failures to extract the comparator, or the
normalizers needed to perform the required comparisons based on the schemaServerValue#compareTo(Value)public StringValue clone()
clone in interface Value<String>clone in class AbstractValue<String>public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public boolean isHumanReadable()
true if the value is a String, false otherwisepublic int length()
public byte[] getBytes()
getBytes in interface Value<String>getBytes in class AbstractValue<String>public String getString()
getString in interface Value<String>getString in class AbstractValue<String>
public static StringValue deserialize(ObjectInput in)
throws IOException,
ClassNotFoundException
in - The input stream
IOException - If the stream can't be read
ClassNotFoundException - If we can't instanciate a StringValue
public static StringValue deserialize(AttributeType attributeType,
ObjectInput in)
throws IOException,
ClassNotFoundException
attributeType - The AttributeType associated with the Value. Can be nullin - The input stream
IOException - If the stream can't be read
ClassNotFoundException - If we can't instanciate a StringValue
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
IOExceptionpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||