Package org.springframework.ldap.core
Class NameAwareAttribute
java.lang.Object
org.springframework.ldap.core.NameAwareAttribute
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Attribute
Used internally to make DirContextAdapter properly handle Names as values.
- Since:
- 2.0
- See Also:
-
Field Summary
Fields inherited from interface javax.naming.directory.Attribute
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance with the specified id and no values.NameAwareAttribute(String id, boolean orderMatters) Construct a new instance with the specified id, no values and order significance as specified.NameAwareAttribute(String id, Object value) Construct a new instance with the specified id and one value.NameAwareAttribute(Attribute attribute) Construct a new instance from the supplied Attribute. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidclear()clone()booleanbooleanget()get(int ix) Due to performance reasons it is not advised to iterate over the attribute's values using this method.getAll()getID()inthashCode()booleanvoidbooleaniterator()remove(int ix) booleanintsize()toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
NameAwareAttribute
Construct a new instance with the specified id and one value.- Parameters:
id- the attribute idvalue- the value to start off with
-
NameAwareAttribute
Construct a new instance from the supplied Attribute.- Parameters:
attribute- the Attribute to copy.
-
NameAwareAttribute
Construct a new instance with the specified id and no values.- Parameters:
id- the attribute id
-
NameAwareAttribute
Construct a new instance with the specified id, no values and order significance as specified.- Parameters:
id- the attribute idorderMatters- whether order has significance in this attribute.
-
-
Method Details
-
getAll
-
get
-
size
public int size() -
getID
-
contains
-
add
-
initValuesAsNames
public void initValuesAsNames() -
hasValuesAsNames
public boolean hasValuesAsNames() -
remove
-
clear
public void clear() -
getAttributeSyntaxDefinition
- Specified by:
getAttributeSyntaxDefinitionin interfaceAttribute- Throws:
NamingException
-
getAttributeDefinition
- Specified by:
getAttributeDefinitionin interfaceAttribute- Throws:
NamingException
-
isOrdered
public boolean isOrdered() -
get
Due to performance reasons it is not advised to iterate over the attribute's values using this method. Please use the
iterator()instead.- Specified by:
getin interfaceAttribute- Throws:
NamingException
-
remove
-
add
-
set
-
clone
-
equals
-
hashCode
public int hashCode() -
toString
-
iterator
-