Class SerLdapAttr
java.lang.Object
org.bremersee.ldaptive.serializable.SerLdapAttr
- All Implemented Interfaces:
Serializable
A serializable ldap attribute.
- Author:
- Christian Bremer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSerLdapAttr(String name, boolean binary, List<String> values) Instantiates a new Ser ldap attr.SerLdapAttr(org.ldaptive.LdapAttribute ldapAttribute) Instantiates a new serializable ldap attribute. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]Returns a single byte array value of this attribute.Collection<byte[]> Returns the values of this attribute as byte arrays.Returns a single string value of this attribute.Returns the values of this attribute as strings.inthashCode()booleanhasValue(byte[] value) Returns whether the supplied value exists in this attribute.booleanReturns whether the supplied value exists in this attribute.intsize()Returns the number of values in this ldap attribute.org.ldaptive.LdapAttributeTo ldap attribute.
-
Constructor Details
-
SerLdapAttr
public SerLdapAttr(org.ldaptive.LdapAttribute ldapAttribute) Instantiates a new serializable ldap attribute.- Parameters:
ldapAttribute- the ldap attribute
-
SerLdapAttr
Instantiates a new Ser ldap attr.- Parameters:
name- the namebinary- the binaryvalues- the values
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
size
public int size()Returns the number of values in this ldap attribute.- Returns:
- number of values in this ldap attribute
-
getStringValue
Returns a single string value of this attribute.- Returns:
- single string attribute value or null if this attribute is empty
-
getStringValues
Returns the values of this attribute as strings. Binary data is base64 encoded. The return collection cannot be modified.- Returns:
- collection of string attribute values
-
getBinaryValue
public byte[] getBinaryValue()Returns a single byte array value of this attribute.- Returns:
- single byte array attribute value or null if this attribute is empty
-
getBinaryValues
Returns the values of this attribute as byte arrays. The return collection cannot be modified.- Returns:
- collection of string attribute values
-
hasValue
public boolean hasValue(byte[] value) Returns whether the supplied value exists in this attribute.- Parameters:
value- to find- Returns:
- whether value exists
-
hasValue
Returns whether the supplied value exists in this attribute.- Parameters:
value- to find- Returns:
- whether value exists
-
toLdapAttribute
public org.ldaptive.LdapAttribute toLdapAttribute()To ldap attribute.- Returns:
- the ldap attribute
-