Package org.ldaptive.dn
Class NameValue
- java.lang.Object
-
- org.ldaptive.dn.NameValue
-
public class NameValue extends java.lang.ObjectContainer for a RDN name value pair.- Author:
- Middleware Services
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Stringformat()Returns a string representation of this name value, of the form 'name=value'.byte[]getBinaryValue()java.lang.StringgetName()Returns the attribute name.java.lang.StringgetStringValue()<T> TgetValue(java.util.function.Function<byte[],T> func)inthashCode()booleanhasName(java.lang.String name)Returns whether the attribute name matches the supplied name.java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-