|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.AttributeValue
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class AttributeValue
This class defines a data structure that holds information about a single value of an attribute. It will always store the value in user-provided form, and will also store either a reference to the associated attribute type or the normalized form of the value. The normalized form of the value should only be used in cases where equality matching between two values can be performed with byte-for-byte comparisons of the normalized values.
Constructor Summary | |
---|---|
AttributeValue(AttributeType attributeType,
ByteString value)
Creates a new attribute value with the provided information. |
|
AttributeValue(AttributeType attributeType,
java.lang.String value)
Creates a new attribute value with the provided information. |
|
AttributeValue(ByteString value,
ByteString normalizedValue)
Creates a new attribute value with the provided information. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Determines whether this attribute value is equal to the provided object. |
java.lang.String |
getNormalizedStringValue()
Retrieves a string representation of the normalized form of this attribute value. |
ByteString |
getNormalizedValue()
Retrieves the normalized form of this attribute value. |
byte[] |
getNormalizedValueBytes()
Retrieves the bytes that make up the normalized form of this value. |
java.lang.String |
getStringValue()
Retrieves a string representation of the user-defined form of this attribute value. |
ByteString |
getValue()
Retrieves the user-defined form of this attribute value. |
byte[] |
getValueBytes()
Retrieves the raw bytes that make up this attribute value. |
int |
hashCode()
Retrieves the hash code for this attribute value. |
java.lang.String |
toString()
Retrieves a string representation of this attribute value. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this attribute value to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeValue(AttributeType attributeType, ByteString value)
attributeType
- The attribute type for this attribute
value. It must not be null
.value
- The value in user-provided form for this
attribute value. It must not be
null
.public AttributeValue(AttributeType attributeType, java.lang.String value)
attributeType
- The attribute type for this attribute
value. It must not be null
.value
- The value in user-provided form for this
attribute value. It must not be
null
.public AttributeValue(ByteString value, ByteString normalizedValue)
value
- The user-provided form of this value.
It must not be null
.normalizedValue
- The normalized form of this value. It
must not be null
.Method Detail |
---|
public ByteString getValue()
public byte[] getValueBytes()
public java.lang.String getStringValue()
public ByteString getNormalizedValue() throws DirectoryException
DirectoryException
- If an error occurs while trying to
normalize the value (e.g., if it is
not acceptable for use with the
associated equality matching rule).public byte[] getNormalizedValueBytes() throws DirectoryException
DirectoryException
- If an error occurs while trying to
normalize the value (e.g., if it is
not acceptable for use with the
associated equality matching rule).public java.lang.String getNormalizedStringValue() throws DirectoryException
DirectoryException
- If an error occurs while trying to
normalize the value (e.g., if it is
not acceptable for use with the
associated equality matching rule).public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if this attribute value is equal to
the provided object, or false
if not.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |