T
- The valye typepublic abstract class AbstractValue<T> extends Object implements Value<T>
Constructor and Description |
---|
AbstractValue() |
Modifier and Type | Method and Description |
---|---|
void |
apply(AttributeType attributeType)
Apply an AttributeType to the current Value, normalizing it.
|
Value<T> |
clone()
Clone a Value
|
AttributeType |
getAttributeType()
Get the associated AttributeType
|
byte[] |
getBytes()
Get the wrapped value as a byte[].
|
T |
getNormReference()
Gets a reference to the the normalized (canonical) representation
for the wrapped value.
|
T |
getReference()
Gets a reference to the wrapped value.
|
String |
getString()
Get the wrapped value as a String.
|
boolean |
isInstanceOf(AttributeType attributeType)
Check if the value is stored into an instance of the given
AttributeType, or one of its ascendant.
|
boolean |
isNull()
Check if the contained value is null or not
|
boolean |
isSchemaAware()
Tells if the value is schema aware or not.
|
boolean |
isValid(SyntaxChecker syntaxChecker)
Uses the syntaxChecker associated with the attributeType to check if the
value is valid.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNormValue, getValue, isHumanReadable, length
readExternal, writeExternal
compareTo
public AbstractValue()
public T getReference()
getReference
in interface Value<T>
public byte[] getBytes()
public AttributeType getAttributeType()
getAttributeType
in interface Value<T>
public void apply(AttributeType attributeType) throws LdapInvalidAttributeValueException
apply
in interface Value<T>
attributeType
- The AttributeType to applyLdapInvalidAttributeValueException
- If the value is not valid accordingly
to the schemapublic boolean isInstanceOf(AttributeType attributeType)
isInstanceOf
in interface Value<T>
attributeType
- The AttributeType we are looking attrue
if the value is associated with the given
attributeType or one of its ascendantpublic T getNormReference()
getNormReference
in interface Value<T>
public final boolean isNull()
public final boolean isValid(SyntaxChecker syntaxChecker) throws LdapInvalidAttributeValueException
isValid
in interface Value<T>
syntaxChecker
- the SyntaxChecker to use to validate the valuetrue
if the value is validLdapInvalidAttributeValueException
- if the value cannot be validatedpublic final boolean isSchemaAware()
isSchemaAware
in interface Value<T>
true
if the value is sxhema awareCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.