|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.message.AttributeImpl
public class AttributeImpl
Permanently Lockable ordered JNDI Attribute implementation.
| Constructor Summary | |
|---|---|
AttributeImpl(javax.naming.directory.Attribute attribute)
Create a copy of an Attribute, be it an AttributeImpl instance of a BasicAttribute instance |
|
AttributeImpl(java.lang.String id)
Creates a permanently Attribute on id whose locking behavior is dictated by parent. |
|
AttributeImpl(java.lang.String id,
byte[] value)
Creates a permanently Attribute on id with a single value. |
|
AttributeImpl(java.lang.String id,
java.lang.Object value)
Creates a permanently Attribute on id with a single value. |
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object attrVal)
Inserts attrVal into the list of this Attribute's values at the specified index in the list. |
boolean |
add(java.lang.Object attrVal)
Adds attrVal into the list of this Attribute's values at the end of the list. |
void |
clear()
Removes all the values of this Attribute from the list backing store. |
java.lang.Object |
clone()
Not a deep clone. |
boolean |
contains(java.lang.Object attrVal)
Checks to see if this Attribute contains attrVal in the list. |
boolean |
equals(java.lang.Object obj)
Checks for equality between this Attribute instance and another. |
java.lang.Object |
get()
Gets the first value of the list or null if no values exist. |
java.lang.Object |
get(int index)
Gets the value at an index. |
javax.naming.NamingEnumeration<java.lang.Object> |
getAll()
Gets a NamingEnumberation wrapped around the iterator of the value list. |
javax.naming.directory.DirContext |
getAttributeDefinition()
NOT SUPPORTED - throws OperationNotSupportedException |
javax.naming.directory.DirContext |
getAttributeSyntaxDefinition()
NOT SUPPORTED - throws OperationNotSupportedException |
java.lang.String |
getID()
Gets the id or name of this Attribute. |
int |
hashCode()
Compute the hash code for this attribute. |
boolean |
isOrdered()
Always returns true since list is used to preserve value addition order. |
java.lang.Object |
remove(int index)
Removes the value at an index. |
boolean |
remove(java.lang.Object attrVal)
Removes attrVal from the list of this Attribute's values. |
java.lang.Object |
set(int index,
java.lang.Object attrVal)
Sets an attribute value in the ordered list of attribute values. |
int |
size()
Gets the size of the value list. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeImpl(java.lang.String id)
id - the id or name of this attribute.
public AttributeImpl(java.lang.String id,
java.lang.Object value)
id - the id or name of this attribute.value - a value for the attribute
public AttributeImpl(java.lang.String id,
byte[] value)
id - the id or name of this attribute.value - a value for the attribute
public AttributeImpl(javax.naming.directory.Attribute attribute)
throws javax.naming.NamingException
attribute - the Attribute instace to copy
javax.naming.NamingException| Method Detail |
|---|
public javax.naming.NamingEnumeration<java.lang.Object> getAll()
getAll in interface javax.naming.directory.Attributepublic java.lang.Object get()
get in interface javax.naming.directory.Attributepublic int size()
size in interface javax.naming.directory.Attributepublic java.lang.String getID()
getID in interface javax.naming.directory.Attributepublic boolean contains(java.lang.Object attrVal)
contains in interface javax.naming.directory.AttributeattrVal - the value to test for
public boolean add(java.lang.Object attrVal)
add in interface javax.naming.directory.AttributeattrVal - the value to add to the end of the list.
public boolean remove(java.lang.Object attrVal)
remove in interface javax.naming.directory.AttributeattrVal - the value to remove
public void clear()
clear in interface javax.naming.directory.Attribute
public javax.naming.directory.DirContext getAttributeSyntaxDefinition()
throws javax.naming.NamingException
getAttributeSyntaxDefinition in interface javax.naming.directory.Attributejavax.naming.NamingExceptionAttribute.getAttributeSyntaxDefinition()
public javax.naming.directory.DirContext getAttributeDefinition()
throws javax.naming.NamingException
getAttributeDefinition in interface javax.naming.directory.Attributejavax.naming.NamingExceptionAttribute.getAttributeDefinition()public java.lang.Object clone()
clone in interface javax.naming.directory.Attributeclone in class java.lang.Objectpublic boolean isOrdered()
isOrdered in interface javax.naming.directory.Attributepublic java.lang.Object get(int index)
get in interface javax.naming.directory.Attributeindex - the index of the value in the ordered list of attribute
values. 0 <= ix < size().
public java.lang.Object remove(int index)
remove in interface javax.naming.directory.Attributeindex - the index of the value in the ordered list of attribute
values. 0 <= ix < size().
public void add(int index,
java.lang.Object attrVal)
add in interface javax.naming.directory.Attributeindex - the index to add the value at.attrVal - the value to add to the end of the list.
public java.lang.Object set(int index,
java.lang.Object attrVal)
set in interface javax.naming.directory.Attributeindex - the index to set the value to.attrVal - the value to set at the index.
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the Attribute to test for equality
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||