|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.entry.AbstractValue<T>
public abstract class AbstractValue<T>
A wrapper around byte[] values in entries.
| Field Summary | |
|---|---|
protected boolean |
normalized
A flag set when the value has been normalized |
protected T |
normalizedValue
the canonical representation of the wrapped value |
protected boolean |
same
A flag set if the normalized data is different from the wrapped data |
protected java.lang.Boolean |
valid
cached results of the isValid() method call |
protected T |
wrapped
the wrapped binary value |
| Constructor Summary | |
|---|---|
AbstractValue()
|
|
| Method Summary | |
|---|---|
void |
clear()
Reset the value |
Value<T> |
clone()
|
T |
get()
Gets a copy of the wrapped binary value. |
T |
getNormalizedValue()
Gets the normalized (canonical) representation for the wrapped value. |
T |
getNormalizedValueReference()
Gets a reference to the the normalized (canonical) representation for the wrapped value. |
T |
getReference()
Gets a reference to the wrapped binary value. |
boolean |
isNormalized()
Tells if the value has already be normalized or not. |
boolean |
isNull()
Check if the contained value is null or not |
boolean |
isSame()
|
boolean |
isValid()
Check if the Valid flag is set or not. |
boolean |
isValid(SyntaxChecker syntaxChecker)
Uses the syntaxChecker associated with the attributeType to check if the value is valid. |
void |
normalize()
Normalize the value. |
abstract void |
set(T wrapped)
Sets this value's wrapped value to a copy of the src array. |
void |
setNormalized(boolean normalized)
Set the normalized flag. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.entry.Value |
|---|
getBytes, getCopy, getNormalizedValueCopy, getString, isBinary, length, normalize |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected T wrapped
protected T normalizedValue
protected boolean normalized
protected java.lang.Boolean valid
protected transient boolean same
| Constructor Detail |
|---|
public AbstractValue()
| Method Detail |
|---|
public void clear()
clear in interface Value<T>public Value<T> clone()
clone in interface Value<T>clone in class java.lang.Objectpublic T getReference()
getReference in interface Value<T>public T get()
get in interface Value<T>public T getNormalizedValue()
getNormalizedValue in interface Value<T>public T getNormalizedValueReference()
getNormalizedValueReference in interface Value<T>public final boolean isNull()
isNull in interface Value<T>true if the inner value is null.public final boolean isSame()
isSame in interface Value<T>public boolean isValid()
false
isValid in interface Value<T>true if the value is validServerValue#isValid()
public final boolean isValid(SyntaxChecker syntaxChecker)
throws javax.naming.NamingException
isValid in interface Value<T>syntaxChecker - the SyntaxChecker to use to validate the value
true if the value is valid
javax.naming.NamingException - if the value cannot be validatedServerValue#isValid()
public void normalize()
throws javax.naming.NamingException
normalize in interface Value<T>javax.naming.NamingException - If the value cannot be normalizedpublic abstract void set(T wrapped)
set in interface Value<T>wrapped - the byte array to use as the wrapped valuepublic final boolean isNormalized()
isNormalized in interface Value<T>true if the value has already been normalized.public final void setNormalized(boolean normalized)
setNormalized in interface Value<T>the - value : true or false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||