Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory
11g Release 2 (11.1.2.2.0)

E38583-02


oracle.oud.types
Interface AttributeDescription

All Superinterfaces:
java.lang.Comparable<AttributeDescription>

public interface AttributeDescription
extends java.lang.Comparable<AttributeDescription>

An attribute description as defined in RFC 4512 section 2.5. Attribute descriptions are used to identify an attribute in an entry and are composed of an attribute type and a set of zero or more attribute options.

Creation of AttributeDescription is provided by newAttributeDescription(String)

See Also:
RFC 4512 - Lightweight Directory Access Protocol (LDAP): Directory Information Models

Method Summary
 int compareTo(AttributeDescription other)
          Compares this attribute description to the provided attribute description.
 boolean containsOption(java.lang.String option)
          Indicates whether or not this attribute description contains the provided option.
 boolean equals(java.lang.Object o)
          Indicates whether the provided object is an attribute description which is equal to this attribute description.
 AttributeType getAttributeType()
          Returns the attribute type associated with this attribute description.
 java.lang.Iterable<java.lang.String> getOptions()
          Returns an Iterable containing the options contained in this attribute description.
 int hashCode()
          Returns the hash code for this attribute description.
 boolean hasOptions()
          Indicates whether or not this attribute description has any options.
 boolean isObjectClass()
          Indicates whether or not this attribute description is the objectClass attribute description with no options.
 boolean isSubTypeOf(AttributeDescription other)
          Indicates whether or not this attribute description is a sub-type of the provided attribute description as defined in RFC 4512 section 2.5.
 boolean isSuperTypeOf(AttributeDescription other)
          Indicates whether or not this attribute description is a super-type of the provided attribute description as defined in RFC 4512 section 2.5.
 java.lang.String toString()
          Returns the string representation of this attribute description as defined in RFC4512 section 2.5.

 

Method Detail

compareTo

int compareTo(AttributeDescription other)
              throws java.lang.NullPointerException
Compares this attribute description to the provided attribute description. The attribute types are compared first and then, if equal, the options are normalized, sorted, and compared.
Specified by:
compareTo in interface java.lang.Comparable<AttributeDescription>
Parameters:
other - The attribute description to be compared.
Returns:
A negative integer, zero, or a positive integer as this attribute description is less than, equal to, or greater than the specified attribute description.
Throws:
java.lang.NullPointerException - If name was null.

containsOption

boolean containsOption(java.lang.String option)
                       throws java.lang.NullPointerException
Indicates whether or not this attribute description contains the provided option.
Parameters:
option - The option for which to make the determination.
Returns:
true if this attribute description has the provided option, or false if not.
Throws:
java.lang.NullPointerException - If option was null.

equals

boolean equals(java.lang.Object o)
Indicates whether the provided object is an attribute description which is equal to this attribute description. It will be considered equal if the attribute type and normalized sorted list of options are identical.
Overrides:
equals in class java.lang.Object
Parameters:
o - The object for which to make the determination.
Returns:
true if the provided object is an attribute description that is equal to this attribute description, or false if not.

getAttributeType

AttributeType getAttributeType()
Returns the attribute type associated with this attribute description.
Returns:
The attribute type associated with this attribute description.

getOptions

java.lang.Iterable<java.lang.String> getOptions()
Returns an Iterable containing the options contained in this attribute description. Attempts to remove options using an iterator's remove() method are not permitted and will result in an UnsupportedOperationException being thrown.
Returns:
An Iterable containing the options.

hasOptions

boolean hasOptions()
Indicates whether or not this attribute description has any options.
Returns:
true if this attribute description has any options, or false if not.

hashCode

int hashCode()
Returns the hash code for this attribute description. It will be calculated as the sum of the hash codes of the attribute type and normalized sorted list of options.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code for this attribute description.

isObjectClass

boolean isObjectClass()
Indicates whether or not this attribute description is the objectClass attribute description with no options.
Returns:
true if this attribute description is the objectClass attribute description with no options, or false if not.

isSubTypeOf

boolean isSubTypeOf(AttributeDescription other)
                    throws java.lang.NullPointerException
Indicates whether or not this attribute description is a sub-type of the provided attribute description as defined in RFC 4512 section 2.5. Specifically, this method will return true if and only if the following conditions are both true: Note that this method will return true if this attribute description is equal to the provided attribute description.
Parameters:
other - The attribute description for which to make the determination.
Returns:
true if this attribute description is a sub-type of the provided attribute description, or false if not.
Throws:
java.lang.NullPointerException - If name was null.

isSuperTypeOf

boolean isSuperTypeOf(AttributeDescription other)
                      throws java.lang.NullPointerException
Indicates whether or not this attribute description is a super-type of the provided attribute description as defined in RFC 4512 section 2.5. Specifically, this method will return true if and only if the following conditions are both true: Note that this method will return true if this attribute description is equal to the provided attribute description.
Parameters:
other - The attribute description for which to make the determination.
Returns:
true if this attribute description is a super-type of the provided attribute description, or false if not.
Throws:
java.lang.NullPointerException - If name was null.

toString

java.lang.String toString()
Returns the string representation of this attribute description as defined in RFC4512 section 2.5.
Overrides:
toString in class java.lang.Object
Returns:
The string representation of this attribute description.

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory
11g Release 2 (11.1.2.2.0)

E38583-02


Copyright © 2013, Oracle and/or its affiliates. All rights reserved.