Package org.ldaptive.dn
Class NameValue
- java.lang.Object
-
- org.ldaptive.dn.NameValue
-
public class NameValue extends java.lang.Object
Container for a RDN name value pair.- Author:
- Middleware Services
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
format()
Returns a string representation of this name value, of the form 'name=value'.byte[]
getBinaryValue()
java.lang.String
getName()
Returns the attribute name.java.lang.String
getStringValue()
<T> T
getValue(java.util.function.Function<byte[],T> func)
int
hashCode()
boolean
hasName(java.lang.String name)
Returns whether the attribute name matches the supplied name.java.lang.String
toString()
-
-
-
Constructor Detail
-
NameValue
public NameValue(java.lang.String name, java.lang.String value)
Creates a new name value.- Parameters:
name
- of the attributevalue
- of the attribute
-
NameValue
public NameValue(java.lang.String name, byte[] value)
Creates a new name value.- Parameters:
name
- of the attributevalue
- of the attribute
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the attribute name.- Returns:
- attribute name
-
getBinaryValue
public byte[] getBinaryValue()
-
getStringValue
public java.lang.String getStringValue()
-
getValue
public <T> T getValue(java.util.function.Function<byte[],T> func)
-
hasName
public boolean hasName(java.lang.String name)
Returns whether the attribute name matches the supplied name.- Parameters:
name
- to match- Returns:
- whether name matches the attribute name
-
format
public java.lang.String format()
Returns a string representation of this name value, of the form 'name=value'.- Returns:
- string form of the name value pair
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-