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
ConstructorDescriptionConstruct 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 TypeMethodDescriptionvoid
boolean
void
clear()
clone()
boolean
boolean
get()
get
(int ix) Due to performance reasons it is not advised to iterate over the attribute's values using this method.getAll()
getID()
int
hashCode()
boolean
void
boolean
iterator()
remove
(int ix) boolean
int
size()
toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
getAttributeSyntaxDefinition
in interfaceAttribute
- Throws:
NamingException
-
getAttributeDefinition
- Specified by:
getAttributeDefinition
in 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:
get
in interfaceAttribute
- Throws:
NamingException
-
remove
-
add
-
set
-
clone
-
equals
-
hashCode
public int hashCode() -
toString
-
iterator
-